Message ID | c26c73d8-9b20-431e-a299-c9508ac3f6ed@web.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-88438-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp1066251dyb; Fri, 1 Mar 2024 05:12:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUEBjaVV65ybhcB0TqQBscKbXnReHfTmtQypCbRLnz/wOQ27hnVOpOmG+HGVsOpbQujChNteqIJxcOKK5fRg69s+u3DKA== X-Google-Smtp-Source: AGHT+IHoozWNKK6og9awDbY6Xj4ExSlalUfXqN9C32kf+WIhI2SMeqPbDN+iBfmZOVpT7A4hzzLD X-Received: by 2002:ac2:5106:0:b0:513:1816:bbfc with SMTP id q6-20020ac25106000000b005131816bbfcmr1109869lfb.27.1709298730846; Fri, 01 Mar 2024 05:12:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709298730; cv=pass; d=google.com; s=arc-20160816; b=0htRH4d4RAok8+loYQJX/8UycsVonFaU/L2njvSqvgVCA7fTLQsXc+GMhG8LfGKUBV N2wSLhbaIIo5e/cz6jTFRAvM0we40pDPGq6nkMQ9zXeHOon3UfEvKTmiNpFrbswYJeNB kdu1DKG0a6kwPJ45GyYzd0V/0m2IJoecZ1DzH/eJt/53kpMJAYXkoxxtvw9dTLPIqJ1B lQdPN9Aon1lBTGJfS5/7FJ65Zb7YVWBM7PPUsJ3NMmLp6yaPR5hj/aDruKY2wYjyuWpX n4efKxxs5wdYKv3pYvlBFJ0uhIG8uNTk0Bc4L+tdKzufofR+mj79tc5esCc1xLpqOhwc YpgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:subject:from:cc :content-language:to:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=uufCXMj8GxIx5l8tbeUzoQuND7zs+B6k1MZD2EoSPxA=; fh=sRj7jN7exhgyhd0RlIbgJv7oZtnPgu7EQ9sCsU8pONg=; b=sgAUzkIt1YaIEgyeeormRL0kF41QzJl39U5vEwdJm3Ixa0WPNhkA1EWZkMo6NFUOAE 3PgLoBy64szVZ5PqJCSvlsnwIMKiwCIHi9KvS0q16iRTRBntwSJtR+VSipdQdhfITFjm TxgTWNZ9xhSzFfHDCV6ikYsxJKYBSvv+Dx7tMG1+xWIpaXAtwgShjAEBZS9riN9mrRVt 7yKn+OgOwIzGy5NP489ueItRnRqGPo3Aof0fMoy9KrMxoWFWs+GlheyeRTiJh6Srzqh7 Ut7mCVb72YmwAxtUs41iSR1vVX/8ws+qMybgybrNyGnFFGJXHGpXJpcriM/6izWVzf3n M5cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=vAPAXPKt; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-88438-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88438-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s5-20020aa7cb05000000b005661390c436si1453269edt.449.2024.03.01.05.12.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 05:12:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88438-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=vAPAXPKt; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-88438-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88438-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CFE4A1F22928 for <ouuuleilei@gmail.com>; Fri, 1 Mar 2024 13:11:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D0A16EB45; Fri, 1 Mar 2024 13:11:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="vAPAXPKt" Received: from mout.web.de (mout.web.de [212.227.15.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D434269E15; Fri, 1 Mar 2024 13:11:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709298682; cv=none; b=otGfYSO/ar6UQOnLQDMZbZnAx9Lj7pmPVT4x+wR40oGCEQYcOjZahH5I9Nx7qqbQPi7JKGBONCp4ankjxIduu4rO+Jaw7xygUBs8IHf+InvYJ+jO4yguxPDZzQHYKREHcbTfzRegoC9EiKfPZQF3ucAnLk9o6aHjgSZvq7AVSLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709298682; c=relaxed/simple; bh=OHktGIjUm7CQdUtl/zLN2vwuppLnKIcC+CZk6F9ja24=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=PSNIJ23X4srIUfYKWTJHXxnkwLsMZvb4ZrqXOVjTBoY5DbsgKhOlPHc8wsbTuqJEJZd98r+TezCa/4S4OvyHqgNlQ9VO9w4R8gqBPH2Rvs+fa2mdxMLVDG1ZtbSAFogPBlLrrsTjss13wAZahbyWpAmn722ZiIZq/5AZq1zJ2yA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=vAPAXPKt; arc=none smtp.client-ip=212.227.15.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1709298645; x=1709903445; i=markus.elfring@web.de; bh=OHktGIjUm7CQdUtl/zLN2vwuppLnKIcC+CZk6F9ja24=; h=X-UI-Sender-Class:Date:To:Cc:From:Subject; b=vAPAXPKtfdbuQ2UfClqFlUrK7EJGbKKpZIfa+BIfGuG+lc6YU9GKusC7/BwN8hLR rr5vsLZo2Di++J6P1jNKuD+pmtjbV7vssOdvC0s4joo16QDo3CGjvJQ0SpSQIc592 ZsirhGC/Q9d0/9a/H+XOh0QTnn9B2RCjyyu8LvHHsr49kJABlpXohV5+RUTtu89Gr ESB2TDOaLwByG7l5vBWXc+QEC/UHDwrIQMg+J84dcJofvqfrCQsaR4i1OEhKnyeel dvkjkiLiRX8qBDQ88+takMPKmZisLQrnCO7ueVLU3mtPv92o5WzG/8Dp8RjIcZ5b0 gq5Wxxm3XlixeqVw/w== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.86.95]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M59n6-1rh97Z01bA-0016Y7; Fri, 01 Mar 2024 14:10:45 +0100 Message-ID: <c26c73d8-9b20-431e-a299-c9508ac3f6ed@web.de> Date: Fri, 1 Mar 2024 14:10:41 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org, Biju Das <biju.das.jz@bp.renesas.com>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6ni?= =?utf-8?q?g?= <u.kleine-koenig@pengutronix.de> Content-Language: en-GB Cc: LKML <linux-kernel@vger.kernel.org> From: Markus Elfring <Markus.Elfring@web.de> Subject: [PATCH] media: rzg2l-csi2: Use common error handling code in rzg2l_csi2_parse_dt() Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:araX4k2QEvajPbpM9grsaW6s3R17fGhqPxgHzilzewFkzka73/9 7ur2SvI/96mHuYRr+fTAoXmRubf5VMXj12yiz89UepxZ7+o8XjsCpUE5cQT3KJgVfk9JpxL +EvPm+4nDME4cdXGphJVTbbjWXZmgAimVRskD21h1Gag11210+jzhCb/AOIiq8qjAce9XXv 4bXGrPE44gc8+S/IzjPoA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:pxo9Bvkn7pI=;hrb1XBYTw5d2PZ1qJg7WXAXoFOS k4cqOY/kr2TeE7vtqKX23lx4h8xW1a4KqFAMTS8OSJ78+5H1YGGHAC2oWkwNxZXI6f6LzdXcR mJP8Hh0czfLryeyl19anj9laQ1lp+CgVVd7RUoX0AHF14TkOxSe4BuYcYMZq4m7hny/qmy40I /Zygrdc9PXmchcdUMWKlVvT4etJnwU8EMUuA4CoEYbOFkIvXpfzXGC7+wYeoXuQImlunaJ/Jq k/C24ms36Qs9BtjhS01Aka/brG7sneePI/yC9C0h8G5z07oq1zV0N0VCPSqLuOOX91UojMpRm azExq6WTx54HPcggzf4SE9rzXUoLzrnkTL9JbdbarHIqYqInYLqeYl2enMLfbVVb7mfyqXm10 Y9x4X50aGEPd/RqkxDAxsYTQVE9GSpDWPj28gnjSCN/OYgJfdeuvvystU9QGttMqeYvhBPvRF tOeCpqN9BdH/vVZkbqbeMi0a+8FzbH9u0wHWcFyRBe0+B+n4M768+4RoiEjXW++/qaJtP2JZ3 jQa8pCIwqX6+AkaHXI3pRgr/Yvl/FizrapmuAlaCEIOcZvQwUH5CFBckQZRTIihjXoQbt0lZz R+4HKIMtnO6juof1Wy4WbwQ/nkot0T/KnugpIMq2vTlQdIFUCBFEl54J9p010EBC4EcOK1KgI E0rAXh0r4vEu1Bd3mg85XiDxbKrdLspnc9HqdzABYR3aePL1XANhgcNaejXAPiPEcAIeQUaE+ l4SkZFK1ZjSoYxY49NaxhNse2B3dAsNC2hAjr0PdJXyZ50lXkzFWuwxeRZbO54B4at82yoMO3 ju6mQeOkGfIMBa6DBg067AP1xfcYiG9ulTS1X9S8HY01A= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792329625736727808 X-GMAIL-MSGID: 1792329625736727808 |
Series |
media: rzg2l-csi2: Use common error handling code in rzg2l_csi2_parse_dt()
|
|
Commit Message
Markus Elfring
March 1, 2024, 1:10 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net> Date: Fri, 1 Mar 2024 14:02:22 +0100 Add a label so that a bit of exception handling can be better reused in an if branch of this function implementation. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.44.0
Comments
On Fri, Mar 01, 2024 at 02:10:41PM +0100, Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > Date: Fri, 1 Mar 2024 14:02:22 +0100 > > Add a label so that a bit of exception handling can be better reused > in an if branch of this function implementation. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Just in case someone may be tempted to apply this: NAK Markus, don't bother replying to this e-mail, I will delete your reply without reading it. > --- > drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c > index e68fcdaea207..ef6922dad35f 100644 > --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c > +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c > @@ -671,12 +671,13 @@ static int rzg2l_csi2_parse_dt(struct rzg2l_csi2 *csi2) > ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep); > if (ret) { > dev_err(csi2->dev, "Could not parse v4l2 endpoint\n"); > - fwnode_handle_put(ep); > - return -EINVAL; > + ret = -EINVAL; > + goto put_fwnode_ep; > } > > ret = rzg2l_csi2_parse_v4l2(csi2, &v4l2_ep); > if (ret) { > +put_fwnode_ep: > fwnode_handle_put(ep); > return ret; > } > -- > 2.44.0 > >
diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c index e68fcdaea207..ef6922dad35f 100644 --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c @@ -671,12 +671,13 @@ static int rzg2l_csi2_parse_dt(struct rzg2l_csi2 *csi2) ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep); if (ret) { dev_err(csi2->dev, "Could not parse v4l2 endpoint\n"); - fwnode_handle_put(ep); - return -EINVAL; + ret = -EINVAL; + goto put_fwnode_ep; } ret = rzg2l_csi2_parse_v4l2(csi2, &v4l2_ep); if (ret) { +put_fwnode_ep: fwnode_handle_put(ep); return ret; }