All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
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
Subject: Re: [PATCH -next 12/13] media: rc: ir-rx51: Switch to use dev_err_probe() helper
Date: Mon, 19 Sep 2022 17:36:07 +0300	[thread overview]
Message-ID: <Yyh+V5HZ+U2/XlF4@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220915150324.688062-13-yangyingliang@huawei.com>

Hi Yang,

Thank you for the patch.

On Thu, Sep 15, 2022 at 11:03:23PM +0800, Yang Yingliang 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: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/rc/ir-rx51.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c
> index a3b145183260..85080c3d2053 100644
> --- a/drivers/media/rc/ir-rx51.c
> +++ b/drivers/media/rc/ir-rx51.c
> @@ -231,13 +231,8 @@ static int ir_rx51_probe(struct platform_device *dev)
>  	struct rc_dev *rcdev;
>  
>  	pwm = pwm_get(&dev->dev, NULL);
> -	if (IS_ERR(pwm)) {
> -		int err = PTR_ERR(pwm);
> -
> -		if (err != -EPROBE_DEFER)
> -			dev_err(&dev->dev, "pwm_get failed: %d\n", err);
> -		return err;
> -	}
> +	if (IS_ERR(pwm))
> +		return dev_err_probe(&dev->dev, PTR_ERR(pwm), "pwm_get failed\n");
>  
>  	/* Use default, in case userspace does not set the carrier */
>  	ir_rx51.freq = DIV_ROUND_CLOSEST_ULL(pwm_get_period(pwm), NSEC_PER_SEC);

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-09-19 14:36 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 [this message]
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=Yyh+V5HZ+U2/XlF4@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --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.