Bluetooth: btrtl: Fix an issue for the incorrect error return code.
authorMax Chou <max.chou@realtek.com>
Wed, 18 Sep 2019 08:56:41 +0000 (16:56 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 16 Oct 2019 17:26:40 +0000 (19:26 +0200)
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 <max.chou@realtek.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btrtl.c

index bf3c02b..ae9a204 100644 (file)
@@ -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;
                }