linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] Bluetooth: virtio_bt: fix error return code in virtbt_probe()
@ 2021-12-13  8:27 Yang Yingliang
  2022-01-06 12:37 ` Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-12-13  8:27 UTC (permalink / raw)
  To: linux-kernel, linux-bluetooth; +Cc: marcel, johan.hedberg, luiz.dentz, mst

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 <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 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


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

end of thread, other threads:[~2022-01-06 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13  8:27 [PATCH -next] Bluetooth: virtio_bt: fix error return code in virtbt_probe() Yang Yingliang
2022-01-06 12:37 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).