Skip to content

Commit

Permalink
ieee802154: cc2520: add rc code in cc2520_tx()
Browse files Browse the repository at this point in the history
[ Upstream commit ffd7bdd ]

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>
  • Loading branch information
Li Qiong authored and gregkh committed Sep 20, 2022
1 parent bc55c16 commit 47e83e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ieee802154/cc2520.c
Expand Up @@ -504,6 +504,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;
}
Expand Down

0 comments on commit 47e83e6

Please sign in to comment.