Skip to content

Commit 4d002d6

Browse files
Ziyang XuanStefan-Schmidt
authored andcommitted
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: 0da6bc8 ("ieee802154: cc2520: adds driver for TI CC2520 radio") Signed-off-by: Ziyang Xuan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stefan Schmidt <[email protected]>
1 parent baee5a1 commit 4d002d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ieee802154/cc2520.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ static int cc2520_hw_init(struct cc2520_private *priv)
970970

971971
if (timeout-- <= 0) {
972972
dev_err(&priv->spi->dev, "oscillator start failed!\n");
973-
return ret;
973+
return -ETIMEDOUT;
974974
}
975975
udelay(1);
976976
} while (!(status & CC2520_STATUS_XOSC32M_STABLE));

0 commit comments

Comments
 (0)