[PATCH -next] Bluetooth: virtio_bt: fix error return code in virtbt_probe()

Subsystems: bluetooth drivers, the rest

STALE1673d

2 messages, 2 authors, 2022-01-06 · open the first message on its own page

[PATCH -next] Bluetooth: virtio_bt: fix error return code in virtbt_probe()

From: Yang Yingliang <hidden>
Date: 2021-12-13 08:21:40

Fix to return a negative error code from the error handling
case in virtbt_probe().

Fixes: 212a6e51a630 ("Bluetooth: virtio_bt: fix device removal")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Yang Yingliang <redacted>
---
 drivers/bluetooth/virtio_bt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c
index 1dd734aef87b..f6d699fed139 100644
--- a/drivers/bluetooth/virtio_bt.c
+++ b/drivers/bluetooth/virtio_bt.c
@@ -362,7 +362,8 @@ static int virtbt_probe(struct virtio_device *vdev)
 	}
 
 	virtio_device_ready(vdev);
-	if (virtbt_open_vdev(vbt))
+	err = virtbt_open_vdev(vbt);
+	if (err)
 		goto open_failed;
 
 	return 0;
-- 
2.25.1

Re: [PATCH -next] Bluetooth: virtio_bt: fix error return code in virtbt_probe()

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2022-01-06 12:37:59

On Mon, Dec 13, 2021 at 04:27:51PM +0800, Yang Yingliang wrote:
Fix to return a negative error code from the error handling
case in virtbt_probe().

Fixes: 212a6e51a630 ("Bluetooth: virtio_bt: fix device removal")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Yang Yingliang <redacted>
Acked-by: Michael S. Tsirkin <mst@redhat.com>

same patch was also posted by Dan Carpenter.
quoted hunk
---
 drivers/bluetooth/virtio_bt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/virtio_bt.c b/drivers/bluetooth/virtio_bt.c
index 1dd734aef87b..f6d699fed139 100644
--- a/drivers/bluetooth/virtio_bt.c
+++ b/drivers/bluetooth/virtio_bt.c
@@ -362,7 +362,8 @@ static int virtbt_probe(struct virtio_device *vdev)
 	}
 
 	virtio_device_ready(vdev);
-	if (virtbt_open_vdev(vbt))
+	err = virtbt_open_vdev(vbt);
+	if (err)
 		goto open_failed;
 
 	return 0;
-- 
2.25.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help