* [PATCH] ieee802154: cc2520: Fix error return code in cc2520_hw_init()
@ 2022-11-20 7:50 Ziyang Xuan
2022-11-29 14:01 ` Stefan Schmidt
0 siblings, 1 reply; 2+ messages in thread
From: Ziyang Xuan @ 2022-11-20 7:50 UTC (permalink / raw)
To: varkabhadram, alex.aring, stefan, davem, edumazet, kuba, pabeni,
linux-wpan, netdev
Cc: linux-kernel
In cc2520_hw_init(), if oscillator start failed, the error code
should be returned.
Fixes: 0da6bc8cc341 ("ieee802154: cc2520: adds driver for TI CC2520 radio")
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
---
drivers/net/ieee802154/cc2520.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
index c69b87d3837d..edc769daad07 100644
--- a/drivers/net/ieee802154/cc2520.c
+++ b/drivers/net/ieee802154/cc2520.c
@@ -970,7 +970,7 @@ static int cc2520_hw_init(struct cc2520_private *priv)
if (timeout-- <= 0) {
dev_err(&priv->spi->dev, "oscillator start failed!\n");
- return ret;
+ return -ETIMEDOUT;
}
udelay(1);
} while (!(status & CC2520_STATUS_XOSC32M_STABLE));
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ieee802154: cc2520: Fix error return code in cc2520_hw_init()
2022-11-20 7:50 [PATCH] ieee802154: cc2520: Fix error return code in cc2520_hw_init() Ziyang Xuan
@ 2022-11-29 14:01 ` Stefan Schmidt
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Schmidt @ 2022-11-29 14:01 UTC (permalink / raw)
To: Ziyang Xuan, varkabhadram, alex.aring, davem, edumazet, kuba,
pabeni, linux-wpan, netdev
Cc: linux-kernel
Hello.
On 20.11.22 08:50, Ziyang Xuan wrote:
> In cc2520_hw_init(), if oscillator start failed, the error code
> should be returned.
>
> Fixes: 0da6bc8cc341 ("ieee802154: cc2520: adds driver for TI CC2520 radio")
> Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
> ---
> drivers/net/ieee802154/cc2520.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
> index c69b87d3837d..edc769daad07 100644
> --- a/drivers/net/ieee802154/cc2520.c
> +++ b/drivers/net/ieee802154/cc2520.c
> @@ -970,7 +970,7 @@ static int cc2520_hw_init(struct cc2520_private *priv)
>
> if (timeout-- <= 0) {
> dev_err(&priv->spi->dev, "oscillator start failed!\n");
> - return ret;
> + return -ETIMEDOUT;
> }
> udelay(1);
> } while (!(status & CC2520_STATUS_XOSC32M_STABLE));
This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!
regards
Stefan Schmidt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-29 14:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-20 7:50 [PATCH] ieee802154: cc2520: Fix error return code in cc2520_hw_init() Ziyang Xuan
2022-11-29 14:01 ` Stefan Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).