Bluetooth: btrtl: Fix an issue for the incorrect error return code.
PATCH 1/1 Bluetooth: btrtl: Fix an issue for the incorrect error return code.
From: Max Chou <[email protected]>
It does not need the '-' for PTR_ERR(skb) because PTR_ERR(skb) will return the negative value during errors.
Signed-off-by Max Chou <[email protected]>
--- drivers/bluetooth/btrtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btrtl.c +1 -1
@@ -418,7 +418,7 @@ static int rtl_download_firmware(struct hci_dev *hdev,if (IS_ERR (skb)) {rtl_dev_err (hdev,"download fw command failed (%ld)" ,PTR_ERR (skb)); - ret = -PTR_ERR (skb); + ret =PTR_ERR (skb); goto out; }
Signature · 1 line
2.17.1
Marcel Holtmann
maintainerHi Max,
Quoted 7 lines
It does not need the '-' for
PTR_ERR(skb)becausePTR_ERR(skb)will return the negative value during errors.Signed-off-by Max Chou <[email protected]>---
drivers/bluetooth/btrtl.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel