From patchwork Fri Mar 1 12:10:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 208814 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp1032867dyb; Fri, 1 Mar 2024 04:12:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUljXKFea9GXzxgdAh3LZkUJFz+nCkHObyzas3xoFig+w8mFeS4OdW7/rkBfMqeZiuBnzlC89FDdeNZGvr3MY4TmBMCng== X-Google-Smtp-Source: AGHT+IF3wcWdz9PvFhqzueI9OgkOasBCl/jJDpsc+EdSfxNvSO3anWk2WkNxknBa55vLd5Polgjh X-Received: by 2002:a05:6a21:a584:b0:19e:4e58:5026 with SMTP id gd4-20020a056a21a58400b0019e4e585026mr1371925pzc.4.1709295177320; Fri, 01 Mar 2024 04:12:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709295177; cv=pass; d=google.com; s=arc-20160816; b=lKsG+vgOpBS5MZCus27voXj/1kklbOcKZgWhSl3UutyV6jWAQ3VIwtQWcD9m3mK+HP Z+r8VPBH2jfTxlOn1Qb9kvGLX8fpBwGv0VkGoAMDzVhiZrpMfl6820kVKDmgDWEd5TGn 2TonB9V79OQQGlhv+sG5FbqUbwXVkt11uWLVPs1WJ+TVQTNAhvhK8CTZK156m3gXjv6J nVPIAxp4UQjl/F18iRwBomKlWgE4VsE1SyD8Xbh1HAP1CnOG8CND7OIFwk3mBo1nJKiP lBmDWiEtzmE1kiJ+c3RoX048xSKidefvvVD2ZzlUimKaRI0cLUBmq4UG8poY81qgJv0G Nvsg== 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=qln+yzn9v9Zx3AA0d09Pl7P+U3y5ben4YFqy9sN5MVk=; fh=TxTgkmX3dUc/LrrtaqIgjK/E8dFPA+61yUfVi0s8riw=; b=yb7akXVrEMnvusx+0RcQlm4jLnikWIKzcp8qix9V7GPMTdc04AQsN5ufVU969LfS1Q 7W8XrAQPy7do1RLBIgNVUOPEWxbzcr4imdmmwn4/wVY4PlZWQ2d2RAW8yz3fmgVxcjOG m59h0PMDTr9jZrKWPmQiyuv+W0Ug1m7sIZwyQKO72Ia37L6ZJfL7MZXhSoBjGzauCgol NGEpZFRbeEPrKkS0TWoSX3hZJdfFfkKPQWy3WHhaIf+/xOgU7I6QnLDlkQcIOXwBq8/l 1lpBe55i1u8s+Nv9FYAiEujFvaE+cpPIusY1ZHvY2Xf3sDS5VG9tkKzcXeCtSL+3kkxb 3qMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=n3l4oFTv; 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-88387-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88387-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id bw33-20020a056a0204a100b005ceef6e1c1csi3747875pgb.708.2024.03.01.04.12.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 04:12:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88387-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=n3l4oFTv; 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-88387-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88387-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A3F0AB24462 for ; Fri, 1 Mar 2024 12:10:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E4386E611; Fri, 1 Mar 2024 12:10:30 +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="n3l4oFTv" Received: from mout.web.de (mout.web.de [212.227.15.14]) (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 681FE6D1C8; Fri, 1 Mar 2024 12:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709295027; cv=none; b=Qj2Z+SqVzXnO7OZFHXKiIbXK1GsBDZQ9duz/wbhpZntHWbXOEF7aawv9G/+HfEMs+T9V6cKXON2fec6rRDSeT3meJPVGPT/ktxkRRst1zOIXbbK1keA/bitWX8UxMlTH+TPm51jrMABNrJU3KiCiUGrMkuBWUE6muAw10VnUVJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709295027; c=relaxed/simple; bh=h8r+c+xKuJfgNjc2uCEc8QP+kKYh711JxeWWh1eRyno=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=QLaPByFn3wc/tMgRKIp80FfLzkywSNOHadEA+JFHJxZEDjOSpOa9pMG3F4eIwqiAki7dTOds5fNHTTlnKnKWTUb47rsypYlSI+FZfSTCvVQnaFoXdqgL+kqHv99Wx55aDwIsqtEFPfvlby/MmwIB1ASxtnFezAAJcXvGOXZgqDU= 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=n3l4oFTv; arc=none smtp.client-ip=212.227.15.14 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=1709295017; x=1709899817; i=markus.elfring@web.de; bh=h8r+c+xKuJfgNjc2uCEc8QP+kKYh711JxeWWh1eRyno=; h=X-UI-Sender-Class:Date:To:Cc:From:Subject; b=n3l4oFTv4zuiXWliiZvjBJZbFVEooofgg1ZO8VFnph2rxIxDIl3a1PwgUBQjrmMT 3CXKHW6FF4b6vyDMnzUlebagfMbWFB1jxG9n4ESARXmVD4C5S1vvHorddyG68e7f0 lQYhi6ITZN+s218/gF/ZH194gWzLW3RZfGeiEuwHMpnAySke20j9OOKg4o6tLyPPM NquEwkdm46wXuax9eMfGUuPM/BU96S93UtMW0V5sZo8PDmMk5YedBO+eXwzXrxW6C nt6c4uoCRWZ12c76sAHXggo15J98ZB9xMTCJCHz4raJ9aphV1fTCxk7umrydX7EIJ enaQpavjlDWt6IjlzA== 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 1MnG2C-1qz1O03hCe-00jGjk; Fri, 01 Mar 2024 13:10:16 +0100 Message-ID: <8b4203dc-bc0a-4c00-8862-e2d0ed6e346b@web.de> Date: Fri, 1 Mar 2024 13:10:15 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org, Mauro Carvalho Chehab , =?utf-8?q?Niklas_S=C3=B6derlund?= Content-Language: en-GB Cc: LKML From: Markus Elfring Subject: [PATCH] media: rcar-csi2: Use common error handling code in rcsi2_parse_dt() X-Provags-ID: V03:K1:e8Qqigu2HipwdgXe/vRLuYUi8hLo5kQbAiTz9sFlCosswWvxxUW 4HX41fYAAKfZdNf+WASi8tNE7buVMkC/he+b+KUcDHvvkQqY/z9y76Jb7Qzeyo9q30gYDjA 9/rYIq4bJT/pg6NXz12dJdcM6sBVfKt5E11ofBT33ffijdD2GKL6ivh3Rb+SN9x5Ialx1k1 TD+xhBj2gEFEgphdDkDuA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:UBnMxTdMKLg=;UNsb8OzDk+kpUby0bo5bEnYl2TL Nw4xE3IVlD2gtfd9iz32rR9iVDP9wTL72Cno/LKep3Sc1a7lOLYls08djqGUV2EI9pgKAwtoW MtjWBIKRApK9d3GA2jjxnyyL41/o8v1P55RlwHJs2CzyZHWiJYIC62fWZQbj5T2YyvsEDZykZ RcO/ZgZqrqSlbhjxdQExSqFUeQuz829ILmjxzOEPAAZfv5nfW9CARciS+G+aGjpEdy5ZtGDEN 7Eu20ZDp0ZhXFwpX3R+N0ylymoLOuhZIO4sfLvmuLLt/gzu5Bc6ebWGOMD7noTgClnKpp6wTz smvimXUuQfBm3egJpr/pLIjEmrfL1x8aE4yPy2+RoVjYDkQL3nqXYh83ZQOhn4bxznKqS8hqE UreOHhP9Zx4ON8X3yfMdZFQ2Q4jZ4gNf7j5aYRM41qEhLVH6e1QCMdSrr1i+YIBRcwN3tiewS zIQ9zjN6BVirtlqJvjBTrjeVbmK0kWa1enFO1cSV3B4hQXLdhBYYVebBuhg8T49e5vYJDdZ9O rGj3H5YspFlCd9s311fdaxfoYM00GcG6fbnN/wrmfjDe5BCZ12jf0nWqBtjPuKfN+B+v/hadt 8ojsjT4DgDw8RIPW76W3CBbVAGJhOyIlUE3lrxUTSgCmD0F8aqLho49n2/kU1rFR66UtdgQ8U 5tu3i+2OzixOAgKVNKXpZbd9kPnTDExkAEKDtKddptb/c32CoQF7VtwrXzln71ZMQDJPUx+KN jT+BmPQrzxkP52XiuQwcL98q4mPU9U3UMfq8c/YeMvyB5QsrtVvNGXuzADJgPDO713Myphypt b+/HQFpyV5gyaTdptna/d6DZCDrMuXtjcnDLBspLPEWog= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792325900078721892 X-GMAIL-MSGID: 1792325900078721892 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 --- drivers/media/platform/renesas/rcar-csi2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.44.0 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; }