summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Qiong <liqiong@nfschina.com>2022-08-29 15:12:59 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-20 11:51:31 +0200
commite7c1f676c4faf032c0aa9ef3e64bef3e40fd9a7b (patch)
treea29ae683c977bbe86da451d9bacbba59a73bedb5
parent101a952b47c1ba2b27ea1e2a91c240a6ceb49c45 (diff)
downloadlinux-stable-e7c1f676c4faf032c0aa9ef3e64bef3e40fd9a7b.tar.gz
linux-stable-e7c1f676c4faf032c0aa9ef3e64bef3e40fd9a7b.tar.bz2
linux-stable-e7c1f676c4faf032c0aa9ef3e64bef3e40fd9a7b.zip
ieee802154: cc2520: add rc code in cc2520_tx()
[ Upstream commit ffd7bdddaab193c38416fd5dd416d065517d266e ] The rc code is 0 at the error path "status & CC2520_STATUS_TX_UNDERFLOW". Assign rc code with '-EINVAL' at this error path to fix it. Signed-off-by: Li Qiong <liqiong@nfschina.com> Link: https://lore.kernel.org/r/20220829071259.18330-1-liqiong@nfschina.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ieee802154/cc2520.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
index d50add705a79..436cf2007138 100644
--- a/drivers/net/ieee802154/cc2520.c
+++ b/drivers/net/ieee802154/cc2520.c
@@ -512,6 +512,7 @@ cc2520_tx(struct ieee802154_hw *hw, struct sk_buff *skb)
goto err_tx;
if (status & CC2520_STATUS_TX_UNDERFLOW) {
+ rc = -EINVAL;
dev_err(&priv->spi->dev, "cc2520 tx underflow exception\n");
goto err_tx;
}