From patchwork Mon Dec 13 08:27:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 523511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 437C1C433F5 for ; Mon, 13 Dec 2021 08:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232817AbhLMIVh (ORCPT ); Mon, 13 Dec 2021 03:21:37 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:28312 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231509AbhLMIVh (ORCPT ); Mon, 13 Dec 2021 03:21:37 -0500 Received: from dggpeml500026.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JCDxB4bx3zfbY3; Mon, 13 Dec 2021 16:21:18 +0800 (CST) Received: from dggpeml500017.china.huawei.com (7.185.36.243) by dggpeml500026.china.huawei.com (7.185.36.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 13 Dec 2021 16:21:35 +0800 Received: from huawei.com (10.175.103.91) by dggpeml500017.china.huawei.com (7.185.36.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 13 Dec 2021 16:21:34 +0800 From: Yang Yingliang To: , CC: , , , Subject: [PATCH -next] Bluetooth: virtio_bt: fix error return code in virtbt_probe() Date: Mon, 13 Dec 2021 16:27:51 +0800 Message-ID: <20211213082751.745001-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500017.china.huawei.com (7.185.36.243) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 Signed-off-by: Yang Yingliang Acked-by: Michael S. Tsirkin --- 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;