From patchwork Wed Dec 15 11:46:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12678175 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 7EF97C433FE for ; Wed, 15 Dec 2021 11:47:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242166AbhLOLrK (ORCPT ); Wed, 15 Dec 2021 06:47:10 -0500 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:36262 "EHLO mx0a-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236897AbhLOLrJ (ORCPT ); Wed, 15 Dec 2021 06:47:09 -0500 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BFBSvDK009518; Wed, 15 Dec 2021 11:47:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : content-type : mime-version; s=corp-2021-07-09; bh=tLb7cu/bkpkSLE44XbrtyQSqEItxxM5rr/NtAQzh3qo=; b=VO5NZBu1WEPLyR4kpLGvH6v3Fn8eRMs8/IzUSk6QqN/HneYqsuT0Fsxp3dVg2DLany5X diZBRZJywMcwGoap9bOjjId7EiYAr1ZEdt8hE13YQZ4ngHS/S+K5LPEXwlDBnq96aHc6 FyirnrxVfcQ0r/yf7AK77t8AHP9TaLJEivJS9v6TIQnlzzhfv1+c0oTErNHe9UovFwWo C9oif+iFtzuZzuJXZTzOZ54bgk0J2IpJ3Ea+w9x3RRr7rNclcey3nEgATryD21XUZFx8 Rc+EXhqlM791fWw9shkr4UQ62qO56xFlugNVfbmvUOJKAUS0Xufc5+ykyV+RQ5Rh0Xe9 oA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3cx3mrxpsa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Dec 2021 11:47:04 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1BFBfgdu193837; Wed, 15 Dec 2021 11:47:02 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2168.outbound.protection.outlook.com [104.47.73.168]) by userp3020.oracle.com with ESMTP id 3cvnerqp5g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Dec 2021 11:47:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UPz0T+czms6JXxgPEGkW0EmPCQADXjvWD96FBuRe8fiIdG3parorVNJzq4s4EuhQ1jbGuqkw6wMzm4Ym5PwSj9GEVRCB1Vqz/J+ADiX7ZJpgLOd0ALBEKpKruSdPBj5i4Lo9hwRx02qiJx+w7C3Ted2BHk0o7hczMyIJ0+rnIkcAx9Q2bDM7/x2dfmaJGhi7T9qGzaDsnwV/JfA2wfMFlTWqqyqpiCbctESuD4eJG5KIbRh6aMOunquThzcXxAeODynNDRU+08ZvsPHFqFVAV0txwtEktDVKuTbxRyFfXaOd/q74pHGhLX69tMliIZ+bw3uhx8X3LvqMpscEikBghw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tLb7cu/bkpkSLE44XbrtyQSqEItxxM5rr/NtAQzh3qo=; b=dYLYJqqQyA0ukFRLBVJV4hscnLS1txEQ/YAI+i/OfKjCWyx1HtAcd5PXph3A3+pAwhHCs45sKCyZSA/avIvPw64BnZYg3vVU1BiK8ILUbLkLms8/IttCWFKM3MzHUQ5M2mVkx64BWTGtwOlphH98CD2I8o7Qii1yzg1F3Z/y8olgYlGoNDPeClfE0vXsVX2QZdCbfS+YVHhSSvpjfX20wkO4qP2yqqxp+kTLNZ+Ng8Fg3qmuXhhqujyYPuQm+UOw0c+bLcNv9Y+JBEK64UTceniltueiYWvH3RwdKPzPm6BzADiQ6vYCv/rxOH8q7rJoQ8y282X7I7yssSWNEUsyPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tLb7cu/bkpkSLE44XbrtyQSqEItxxM5rr/NtAQzh3qo=; b=JzPUEVzQCV6c4mRO92NQ4ZQlHTXN5bTDvvNmaKRMktaS54r21Yj50DEvG26mBrVQk2M6CkVdDVcPu5OymiTZ81ei4OXGz56H5lIlu3LTZxQ/XVU/aS2gg4CY7ODeEPeon4kraoY0CEKYzB+ZO7YxJUym1345h0V/X0Pbn7DyXX0= Received: from MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) by MWHPR10MB1664.namprd10.prod.outlook.com (2603:10b6:301:9::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.18; Wed, 15 Dec 2021 11:46:56 +0000 Received: from MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::7194:c377:36cc:d9f0]) by MWHPR1001MB2365.namprd10.prod.outlook.com ([fe80::7194:c377:36cc:d9f0%6]) with mapi id 15.20.4801.014; Wed, 15 Dec 2021 11:46:56 +0000 Date: Wed, 15 Dec 2021 14:46:45 +0300 From: Dan Carpenter To: Marcel Holtmann , "Michael S. Tsirkin" Cc: Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] Bluetooth: virtio_bt: fix an error code in probe() Message-ID: <20211215114644.GC14552@kili> Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: ZR0P278CA0062.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::13) To MWHPR1001MB2365.namprd10.prod.outlook.com (2603:10b6:301:2d::28) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 92f088c3-ad9a-49a5-97cf-08d9bfc09875 X-MS-TrafficTypeDiagnostic: MWHPR10MB1664:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:538; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AVhgZukjZ7nBuzKmTAr844KOtil/NZsYGdFDYGWhoId1ZMQzeeWT3p9UC10iXNHtsw2ZGce3k8lQcXGg/ZOM6eFkHY1lAb2T2ISuwCuUPBHdXj5aINfPe+vRfwtKkoQC6BiLGidFDi6zN+TSo8RiVep67SRQx14QrWEYVNPjPayLJuhScA7cJfNece8A6wkuF89dNWdvoJM5sq+cYTtk5AIzMCFPe55B2evUBp10IaFRkxHAmjjdThLAynBjiBQ+oV6BBpmvvjAsaISjfZKdLQYnp/sCpQ4RTV5OBkcBjeQRVS1rolWYv4w4WmJCSV5rtUifDnxNsOZTtxztQuHNyY25i3hpQRHpOaRDBbmN56NXapCDp3GhDvWpnStLCSBJsSJlUAKzr0bTBr0Sl/f2UtQxzP3hkulj+IlocbU9haUV9pR2n4cr4FJ1fBG8VzpZvTvOOyQFztsVuKJCyM556cljCHOpcg9lVdCfIo3ELCeq02HI8EyCwStXlE4BPuXnhUylvBm0/oU7qCrUHbodoTdVrhpVl+MmGhKH/ojS1mFVaV1QADOwKHrPQijTf4ZcZNQ7G0msH4s+/kPdXoKDDyqOYswdOrLgW7nj51xqIVnXuFxVhxdM2XThdVbaN6/Osg/C975EzhFyoxtdKQwqSLykKGqeZyUxi4x2qBQIHY7U149gssUR+yvGt4Z2aN1YtAcvo736HBoqnNZCD3egzA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2365.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(7916004)(366004)(38100700002)(6512007)(9686003)(4326008)(38350700002)(26005)(66946007)(6666004)(33716001)(44832011)(8676002)(66476007)(66556008)(5660300002)(86362001)(54906003)(1076003)(2906002)(110136005)(4744005)(8936002)(52116002)(83380400001)(508600001)(6506007)(6486002)(186003)(33656002)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yu9MhNd0lrmpcgW+6frGbk02ZthyvA+p6Lhlmy02h2X+pHJcPWmIsARYfChmHFDeqANEWxBaJvHBqu9FLcPzCxYeTUSGlRJ7/6YHkuYlyQcpzVOTebWRs0Kf1yJ1MRuQrK1B3RJ3O9zWYzJULv+V7Kn2vq8RMfKgBABDrAI8DeH88awLhRZ64/7kScGNSLmibb4iQ7kDKHrqRLhuba7fWgs80IX0R+IAutT9Uhv6P77qfd4VVrWsbwBAbe8x+b1Hysa3dw1tOusc1joK2tnVOC9Yns+8Z7cUjTf4GoSO/1TTsOqG0WSPNvKAuQl9g2+ASY0SFXH6AlalnduR9EFtAT6uYEsoBOD0M5lhVcJ9ZQj2gQIIZPV7XnOXU1IZBnU8gcFcwbt+JchOzK//YgeVN09w/tNqfRjGtKv5+JkW7Bb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a1IbdwfgVMaDxBimbQrHM1vqo2qioUyWVoou0RPcX4QQHWMd8nSWODZy0Vf4w7ToUPWIXjejzrFLkIPJ7PzCsGlVjwJoG3XWpG/dzf4+cK/fRKm/DyNqloFyOoVkzSmna8R/hq276C3FMPBzw7kCsV8MKVlRRSJiHNVaHPJYtE6sg4iXiTsNUi7jYRJCI0VT+3psY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92f088c3-ad9a-49a5-97cf-08d9bfc09875 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2365.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2021 11:46:56.3094 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ucRLXEo+WTuO3VsY5Ub2DitZVOMY9pPxg1V7Xh4pzchEC0ox+B9EN04elhgFk2KuqsmcUxz7T6t778HRvcfxVVfwqeOB7kzvDtrxiE7GxJw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1664 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10198 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 malwarescore=0 bulkscore=0 spamscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112150065 X-Proofpoint-ORIG-GUID: AOACT52M4x3BC3GJxZS4B32WE9FGRmzN X-Proofpoint-GUID: AOACT52M4x3BC3GJxZS4B32WE9FGRmzN Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Return an error code if virtbt_open_vdev() fails. Don't return success. Fixes: 212a6e51a630 ("Bluetooth: virtio_bt: fix device removal") Signed-off-by: Dan Carpenter Acked-by: Michael S. Tsirkin --- 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(-) 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;