[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7011ee4d-6ef4-669b-1fbd-596341a6573f@datenfreihafen.org>
Date: Wed, 12 Oct 2022 10:50:45 +0200
From: Stefan Schmidt <stefan@...enfreihafen.org>
To: Yang Yingliang <yangyingliang@...wei.com>, netdev@...r.kernel.org,
linux-wpan@...r.kernel.org
Cc: liuxuenetmail@...il.com, alex.aring@...il.com, davem@...emloft.net
Subject: Re: [PATCH -next] net: ieee802154: mcr20a: Switch to use
dev_err_probe() helper
Hello.
On 15.09.22 09:12, Yang Yingliang wrote:
> dev_err() can be replace with dev_err_probe() which will check if error
> code is -EPROBE_DEFER.
>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
> drivers/net/ieee802154/mcr20a.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ieee802154/mcr20a.c b/drivers/net/ieee802154/mcr20a.c
> index 2fe0e4a0a0c4..f53d185e0568 100644
> --- a/drivers/net/ieee802154/mcr20a.c
> +++ b/drivers/net/ieee802154/mcr20a.c
> @@ -1233,12 +1233,9 @@ mcr20a_probe(struct spi_device *spi)
> }
>
> rst_b = devm_gpiod_get(&spi->dev, "rst_b", GPIOD_OUT_HIGH);
> - if (IS_ERR(rst_b)) {
> - ret = PTR_ERR(rst_b);
> - if (ret != -EPROBE_DEFER)
> - dev_err(&spi->dev, "Failed to get 'rst_b' gpio: %d", ret);
> - return ret;
> - }
> + if (IS_ERR(rst_b))
> + return dev_err_probe(&spi->dev, PTR_ERR(rst_b),
> + "Failed to get 'rst_b' gpio");
>
> /* reset mcr20a */
> usleep_range(10, 20);
This patch has been applied to the wpan-next tree and will be
part of the next pull request to net-next. Thanks!
regards
Stefan Schmidt
Powered by blists - more mailing lists