All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-media@vger.kernel.org>
Cc: <mchehab@kernel.org>, <hverkuil-cisco@xs4all.nl>, <pavel@ucw.cz>,
	<sakari.ailus@linux.intel.com>, <sean@mess.org>,
	<laurent.pinchart@ideasonboard.com>
Subject: [PATCH -next 09/13] media: xilinx: csi2rxss: Switch to use dev_err_probe() helper
Date: Thu, 15 Sep 2022 23:03:20 +0800	[thread overview]
Message-ID: <20220915150324.688062-10-yangyingliang@huawei.com> (raw)
In-Reply-To: <20220915150324.688062-1-yangyingliang@huawei.com>

In the probe path, dev_err() can be replace with dev_err_probe()
which will check if error code is -EPROBE_DEFER.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/media/platform/xilinx/xilinx-csi2rxss.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-csi2rxss.c b/drivers/media/platform/xilinx/xilinx-csi2rxss.c
index 29b53febc2e7..080e2483cc92 100644
--- a/drivers/media/platform/xilinx/xilinx-csi2rxss.c
+++ b/drivers/media/platform/xilinx/xilinx-csi2rxss.c
@@ -976,11 +976,9 @@ static int xcsi2rxss_probe(struct platform_device *pdev)
 	/* Reset GPIO */
 	xcsi2rxss->rst_gpio = devm_gpiod_get_optional(dev, "video-reset",
 						      GPIOD_OUT_HIGH);
-	if (IS_ERR(xcsi2rxss->rst_gpio)) {
-		if (PTR_ERR(xcsi2rxss->rst_gpio) != -EPROBE_DEFER)
-			dev_err(dev, "Video Reset GPIO not setup in DT");
-		return PTR_ERR(xcsi2rxss->rst_gpio);
-	}
+	if (IS_ERR(xcsi2rxss->rst_gpio))
+		return dev_err_probe(dev, PTR_ERR(xcsi2rxss->rst_gpio),
+				     "Video Reset GPIO not setup in DT");
 
 	ret = xcsi2rxss_parse_of(xcsi2rxss);
 	if (ret < 0)
-- 
2.25.1


  parent reply	other threads:[~2022-09-15 14:56 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15 15:03 [PATCH -next 00/13] media: Switch to use dev_err_probe() helper Yang Yingliang
2022-09-15 15:03 ` [PATCH -next 01/13] media: platform: stm32-cec: " Yang Yingliang
2022-09-19 14:32   ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 02/13] media: i2c: ad5820: " Yang Yingliang
2022-09-19 14:37   ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 03/13] media: i2c: imx274: " Yang Yingliang
2022-09-19 14:07   ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 04/13] media: i2c: tc358743: " Yang Yingliang
2022-09-19 14:30   ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 05/13] media: platform: mtk_mdp_comp: " Yang Yingliang
2022-09-19 14:40   ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 06/13] media: platform: exynos4-is: " Yang Yingliang
2022-09-19 14:28   ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 07/13] media: stm32-dcmi: " Yang Yingliang
2022-09-19 14:23   ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 08/13] media: omap3isp: " Yang Yingliang
2022-09-19 14:05   ` Laurent Pinchart
2022-09-15 15:03 ` Yang Yingliang [this message]
2022-09-19 13:58   ` [PATCH -next 09/13] media: xilinx: csi2rxss: " Laurent Pinchart
2022-09-19 14:07     ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 10/13] media: rc: gpio-ir-recv: " Yang Yingliang
2022-09-15 16:38   ` Sean Young
2022-09-16  1:13     ` Yang Yingliang
2022-09-16  9:46       ` Sean Young
2022-09-15 15:03 ` [PATCH -next 11/13] media: rc: gpio-ir-tx: " Yang Yingliang
2022-09-19 14:22   ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 12/13] media: rc: ir-rx51: " Yang Yingliang
2022-09-19 14:36   ` Laurent Pinchart
2022-09-15 15:03 ` [PATCH -next 13/13] media: uvcvideo: " Yang Yingliang
2022-09-18 13:16   ` Ricardo Ribalda
2022-09-19 13:59   ` Laurent Pinchart
2022-09-19 14:42 ` [PATCH -next 00/13] media: " Laurent Pinchart
2022-09-19 15:30   ` Yang Yingliang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220915150324.688062-10-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sean@mess.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.