All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Ribalda <ribalda@chromium.org>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-media@vger.kernel.org, mchehab@kernel.org,
	hverkuil-cisco@xs4all.nl, pavel@ucw.cz,
	sakari.ailus@linux.intel.com, sean@mess.org,
	laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH -next 13/13] media: uvcvideo: Switch to use dev_err_probe() helper
Date: Sun, 18 Sep 2022 14:16:58 +0100	[thread overview]
Message-ID: <CANiDSCsC4Vtwq3NxXazoef7CvnOVG_=nVJtZn3TYT05RvY43Ow@mail.gmail.com> (raw)
In-Reply-To: <20220915150324.688062-14-yangyingliang@huawei.com>

On Thu, 15 Sept 2022 at 16:05, Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> 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>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
> ---
>  drivers/media/usb/uvc/uvc_driver.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> index 744051b52e12..94f84c3c4712 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -1554,12 +1554,9 @@ static int uvc_gpio_parse(struct uvc_device *dev)
>                 return PTR_ERR_OR_ZERO(gpio_privacy);
>
>         irq = gpiod_to_irq(gpio_privacy);
> -       if (irq < 0) {
> -               if (irq != EPROBE_DEFER)
> -                       dev_err(&dev->udev->dev,
> -                               "No IRQ for privacy GPIO (%d)\n", irq);
> -               return irq;
> -       }
> +       if (irq < 0)
> +               return dev_err_probe(&dev->udev->dev, irq,
> +                                    "No IRQ for privacy GPIO\n");
>
>         unit = uvc_alloc_entity(UVC_EXT_GPIO_UNIT, UVC_EXT_GPIO_UNIT_ID, 0, 1);
>         if (!unit)
> --
> 2.25.1
>


-- 
Ricardo Ribalda

  reply	other threads:[~2022-09-18 13:17 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 ` [PATCH -next 09/13] media: xilinx: csi2rxss: " Yang Yingliang
2022-09-19 13:58   ` 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 [this message]
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='CANiDSCsC4Vtwq3NxXazoef7CvnOVG_=nVJtZn3TYT05RvY43Ow@mail.gmail.com' \
    --to=ribalda@chromium.org \
    --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 \
    --cc=yangyingliang@huawei.com \
    /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.