Received: by 10.223.185.116 with SMTP id b49csp685931wrg; Wed, 14 Feb 2018 05:31:51 -0800 (PST) X-Google-Smtp-Source: AH8x224WtCbVicK+EiDpXFMAfgJ12JvOyS0LGVxa4cLny0jnwVLD/FZhV0cNzaMw7Z9M8+7XVE+o X-Received: by 10.98.19.15 with SMTP id b15mr4772463pfj.113.1518615111856; Wed, 14 Feb 2018 05:31:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518615111; cv=none; d=google.com; s=arc-20160816; b=OsatfqKrli2CmJpSJh1NHFVnknw2ujWJX+0e+UWdMUcwzjU0SKQ7O0yKEuwtVZ1j5Q fjtRIlsPto5/rJnpAI++jn7aV/yLC1DPKiePG9/UixvzbChsPK5mb18rlm/Cmp5y1+bA oiTKPpzoJQOFHBzhxtJ6n+EgFxj1sALlpI5XG6AQINc11jIXM30m3mVZ4QirKSp3h8ry UuCGTIWP77T/JvIazPq57HxaPaaQtGj6OapV9c6bKItNfEi5zBgKeUyPA89eHAaO5ZGE M9O8WEgQnyUaQ6XhQ15e2GBBiuR0+M0bLcKho5tTYODWeJMJejZf0lMMXNFaVzHFTwAQ Albg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=25bNl+s5FsxLm7UmSCJalX6lcmZ5EDit8JaANsBL9Z4=; b=BzS7Zz6YkIwfJdWX0qi9IUXux4iLx3BGcURuWEYBnpYUm523u82ZG1lbkpmKB2XW7R kNRPGqmvFUu8QubhXIvfsU6VDXW2qeUjMD9+tVFKbubJCqqwFTK2fniE75WS5fVLkoWN Hq/tpm+YE7Q2ThTCSrfzTP6nnUqW0wXjUQF9SKSXlo14gimpRj9RF444x+PI9tKEmXAM zpjMshg0j650CqiTsV8t49ER1sIYRDXT7Bsww8VyPNtv5s8gQ6151f2LZMbBx3u587ME 4n4Ei08d4U7dTyqAK8+QL9QVC9cN3MjuThAy8Y8Sy7AJ7Uif6FhHVuXYkQ4am3QukX6p j6xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vKr1ul30; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q184si1089664pga.242.2018.02.14.05.31.37; Wed, 14 Feb 2018 05:31:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vKr1ul30; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030397AbeBNNad (ORCPT + 99 others); Wed, 14 Feb 2018 08:30:33 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:64223 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967713AbeBNNaa (ORCPT ); Wed, 14 Feb 2018 08:30:30 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1EDUSbk030889; Wed, 14 Feb 2018 07:30:28 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518615028; bh=AegAhnVCrpx31qEUR2qHiEiJaMdaLS5WnaQbadWJl5c=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=vKr1ul30ownCwp8sl14at0R2gc+Le+1XWXTKIoEBNP6tbHAdJ6fXTL9SH0KCwhzi2 keSyzldjl+TLno+qDL1XiDQwTHpLfhql4IOveKspK2Stg8Ai8QNbGOebUnvGnsJVER vdgRVWSl4FxW3pnJY2V0753OX4DlPFU90td+wg3o= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1EDURui004307; Wed, 14 Feb 2018 07:30:27 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 14 Feb 2018 07:30:27 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 14 Feb 2018 07:30:27 -0600 Received: from [10.1.3.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1EDUPq7026629; Wed, 14 Feb 2018 07:30:26 -0600 Subject: Re: [PATCH 2/2] drm/tilcdc: panel: Use common error handling code in of_get_panel_info() To: SF Markus Elfring , , David Airlie , Tomi Valkeinen CC: LKML , References: <23b2cf6c-7b69-9ade-d97a-18af0c6eb73f@users.sourceforge.net> From: Jyri Sarha Message-ID: <8ea87afa-0713-eaac-640f-85085e148832@ti.com> Date: Wed, 14 Feb 2018 15:30:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <23b2cf6c-7b69-9ade-d97a-18af0c6eb73f@users.sourceforge.net> Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/02/18 23:24, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 6 Feb 2018 22:10:11 +0100 > > Add a jump target so that a bit of exception handling can be better reused > at the end of this function. > > Signed-off-by: Markus Elfring Well, it is couple of lines less. If I would just have couple weeks time to implement proper drm panel support for tilcdc and get rid of this driver all together... Picked for the next tilcdc pullrequest. Thanks, Jyri > --- > drivers/gpu/drm/tilcdc/tilcdc_panel.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c > index 0b6aa95aec89..cf9ca16fee81 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c > @@ -289,10 +289,8 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np) > } > > info = kzalloc(sizeof(*info), GFP_KERNEL); > - if (!info) { > - of_node_put(info_np); > - return NULL; > - } > + if (!info) > + goto put_node; > > ret |= of_property_read_u32(info_np, "ac-bias", &info->ac_bias); > ret |= of_property_read_u32(info_np, "ac-bias-intrpt", &info->ac_bias_intrpt); > @@ -311,11 +309,11 @@ static struct tilcdc_panel_info *of_get_panel_info(struct device_node *np) > if (ret) { > pr_err("%s: error reading panel-info properties\n", __func__); > kfree(info); > - of_node_put(info_np); > - return NULL; > + info = NULL; > } > - of_node_put(info_np); > > +put_node: > + of_node_put(info_np); > return info; > } > > -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki