Skip to contentSkip to conversation

Bluetooth: virtio_bt: fix an error code in probe()

PATCH In review Dan Carpenter 2 participants 2 messages Dec 15, 2021 – Dec 20, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: virtio_bt: fix an error code in probe()

Return an error code if virtbt_open_vdev() fails. Don't return success.

Fixes 212a6e51a630 ("Bluetooth: virtio_bt: fix device removal")

---

This almost certainly goes through Michael's virt tree and not the Bluetooth tree.

 drivers/bluetooth/virtio_bt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bluetooth/virtio_bt.c +2 -1
index 1dd734aef87b..f6d699fed139 100644
@@ -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;
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Dan Carpenter

Return an error code if virtbt_open_vdev() fails. Don't return success.

Fixes 212a6e51a630 ("Bluetooth: virtio_bt: fix device removal")
Quoted 24 lines

---

This almost certainly goes through Michael's virt tree and not the Bluetooth tree.

 drivers/bluetooth/virtio_bt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bluetooth/virtio_bt.c +2 -1
index 1dd734aef87b..f6d699fed139 100644
@@ -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;
Signature · 1 line
2.20.1