summaryrefslogtreecommitdiff
path: root/drivers/net/ieee802154
diff options
context:
space:
mode:
authorZiyang Xuan <william.xuanziyang@huawei.com>2022-11-20 15:50:46 +0800
committerStefan Schmidt <stefan@datenfreihafen.org>2022-11-29 14:51:28 +0100
commit4d002d6a2a00ac1c433899bd7625c6400a74cfba (patch)
treec9a41c0e9b09c0c56ceccbc3f23b5e99605c93e1 /drivers/net/ieee802154
parentbaee5a14ab2c9a8f8df09d021885c8f5de458a38 (diff)
ieee802154: cc2520: Fix error return code in cc2520_hw_init()
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> Link: https://lore.kernel.org/r/20221120075046.2213633-1-william.xuanziyang@huawei.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r--drivers/net/ieee802154/cc2520.c2
1 files changed, 1 insertions, 1 deletions
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));