提交 4d002d6a 编写于 作者: Z Ziyang Xuan 提交者: Stefan Schmidt

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: 0da6bc8c ("ieee802154: cc2520: adds driver for TI CC2520 radio")
Signed-off-by: NZiyang Xuan <william.xuanziyang@huawei.com>
Link: https://lore.kernel.org/r/20221120075046.2213633-1-william.xuanziyang@huawei.comSigned-off-by: NStefan Schmidt <stefan@datenfreihafen.org>
上级 baee5a14
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册