Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp280204lqg; Fri, 1 Mar 2024 05:15:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVGugcC4qowFeoh9zo08CH/IwWZNbyaI4iI6WqOGFgKcl3TqAkjBZ2Y7JAw+YEhPXMd5HzL1cf51aiThFVyC5XeLQ3cNDqwl/VUMuxj7g== X-Google-Smtp-Source: AGHT+IE9JEOB0NH5VKhGlOjkKt0Eu9IEIRZA1lrMPgQz+v8O/3sLaPmpfPf0Ebg8lNYnTXB7cp9R X-Received: by 2002:a0c:e950:0:b0:690:47dc:cb4d with SMTP id n16-20020a0ce950000000b0069047dccb4dmr2640424qvo.7.1709298943423; Fri, 01 Mar 2024 05:15:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709298943; cv=pass; d=google.com; s=arc-20160816; b=fUin4DfyRtotO74NzXc9nAh9qGQbTfzWdZUDSZ5do1/KNY4AVgD1e6SmL/DXDD8rbh 8qcfpiauFt420AYOAe2gzUmAUvXEJYSnU8GmrOOUfYtm8IDA9Y2Ep6+BAGE3gjNpRSxB GKV2riFkEXwpYYoWWW8Tze/S821thihuPMSxobYTXMP51U4y1rTwsyFoB/k6hpkhvZfT BOIcvy6hnXeBd1Wl++lUpPC8zJscFUhJwXKU1aXZGslB1824KvtizFfa49/Tvay5SEVR n0BWbKD9dgK7ee3oKQMCyYVFJUEvkKZqP8g/a7HCievXXIo2nfdO98LHDrn7XOSnMb/2 6mJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=20MklYizVioTzDxRY5Deyt2FkEd8Qaz9Zjo4yg6Sx3k=; fh=Yw2S8JBNcoK+SDzbvgFpwd9pgTaqbjQFsJPj52K1xLc=; b=io3HKPtHpiDYloXhrc9SBnpIrN5z9A9ftfR4JkhQ3bOEgbj2/0VqtqUMIET/MjYIQK Ex1HD8fMd20XYTAERa/h8uYChY37hmwxDhz7KEUEaGDt42746RW19uEDrdgo1j/tJRWd zfAC4Cm+vSAjPXWFPX53/1jygYt0EfQb3YRwGDh68LPQ9FJfhNmadR+2Tg3cJtI9mUzF LZlPdP+vG593MZ0beHEZLoVTUEhRNpXW7liRb244qAG/6zWKyW1QKsYiXFRjX0uWXB06 cUZ8ab+zBNcUODKk4rl24214a/WehRbV0b0qMUm5DjroCDSD8kP2N1SuN2j0b0c9aWDu e8Sg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=jNa9ppBu; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-88442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88442-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t7-20020a0562140c6700b0068f2cd94c5esi3491702qvj.346.2024.03.01.05.15.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 05:15:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=jNa9ppBu; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-88442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88442-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id F2BBB1C20DDF for ; Fri, 1 Mar 2024 13:15:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DD276EB6F; Fri, 1 Mar 2024 13:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="jNa9ppBu" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 8FD1269DFC; Fri, 1 Mar 2024 13:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709298914; cv=none; b=F9doGqEvvbCxWcvuPK1VP/SCRSAUUw87k0qBRZcMXJREWsXd+T2l7wQzFSyT29x3K05sEZVdhO0ueEJCafBBDF760d9AdnlJ6/H+leykUiId8+GbT1IgZrzu/vky6PAef+z7vMn7OwZgBRkQ+r0pZwPCQDyEQn/HXKEOG6aU9kY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709298914; c=relaxed/simple; bh=S9uT2Pz4LtJnMifeUT8J8MOdifzyAx6Erp5bTQR06XY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GnIm9QHJrVM+AXzuXXQBS3L/opLSP9xSW7E3Mct6cLvAnIbXPLU0vXGh5jkfeuB6XG8ZmsRuzczGVQrTbzNmYgvHvoUt59/934v0C5EJb+58nvOTpowk8P6x6+TE3auu9gluHLiCGv8UZaqLJTxK8PQ6QD9DmPYwKk2RI7rcfIw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=jNa9ppBu; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi [89.27.53.110]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E27D99CE; Fri, 1 Mar 2024 14:14:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1709298897; bh=S9uT2Pz4LtJnMifeUT8J8MOdifzyAx6Erp5bTQR06XY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jNa9ppBulCpYblCBQUBcTqcffURdQsXH/j6q2ehohQkvfJyKHPC555WuSJKwTLwc8 QrzAqJILuQwkxBCtDbQs2ftT5Z6bkUoc1w7KGd4NJWvy/4ce2nhFjBLgWOibhokiM8 xn7AbkVk5RwYAT3flrOt2JXtwzsrWqtTLy/M2utQ= Date: Fri, 1 Mar 2024 15:15:13 +0200 From: Laurent Pinchart To: Markus Elfring Cc: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , Niklas =?utf-8?Q?S=C3=B6derlund?= , LKML Subject: Re: [PATCH] media: rcar-csi2: Use common error handling code in rcsi2_parse_dt() Message-ID: <20240301131513.GG30104@pendragon.ideasonboard.com> References: <8b4203dc-bc0a-4c00-8862-e2d0ed6e346b@web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8b4203dc-bc0a-4c00-8862-e2d0ed6e346b@web.de> On Fri, Mar 01, 2024 at 01:10:15PM +0100, Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 1 Mar 2024 13:02:18 +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 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/rcar-csi2.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/renesas/rcar-csi2.c b/drivers/media/platform/renesas/rcar-csi2.c > index 582d5e35db0e..621c92c31965 100644 > --- a/drivers/media/platform/renesas/rcar-csi2.c > +++ b/drivers/media/platform/renesas/rcar-csi2.c > @@ -1388,12 +1388,13 @@ static int rcsi2_parse_dt(struct rcar_csi2 *priv) > ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep); > if (ret) { > dev_err(priv->dev, "Could not parse v4l2 endpoint\n"); > - fwnode_handle_put(ep); > - return -EINVAL; > + ret = -EINVAL; > + goto put_fwnode_ep; > } > > ret = rcsi2_parse_v4l2(priv, &v4l2_ep); > if (ret) { > +put_fwnode_ep: > fwnode_handle_put(ep); > return ret; > } -- Regards, Laurent Pinchart