Linux-Bluetooth Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Bluetooth: btrtl: Fix an issue for the incorrect error return code.
@ 2019-09-18  8:56 max.chou
  2019-09-26  6:34 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: max.chou @ 2019-09-18  8:56 UTC (permalink / raw)
  To: marcel, johan.hedberg, linux-bluetooth, linux-kernel; +Cc: alex_lu, max.chou

From: Max Chou <max.chou@realtek.com>

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>
---
 drivers/bluetooth/btrtl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index bf3c02be6930..ae9a2047f242 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -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;
 		}
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: btrtl: Fix an issue for the incorrect error return code.
  2019-09-18  8:56 [PATCH] Bluetooth: btrtl: Fix an issue for the incorrect error return code max.chou
@ 2019-09-26  6:34 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2019-09-26  6:34 UTC (permalink / raw)
  To: max.chou; +Cc: Johan Hedberg, linux-bluetooth, linux-kernel, alex_lu

Hi Max,

> 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>
> ---
> drivers/bluetooth/btrtl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18  8:56 [PATCH] Bluetooth: btrtl: Fix an issue for the incorrect error return code max.chou
2019-09-26  6:34 ` Marcel Holtmann

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox