Message ID | 9a1270540f0c2db13e81a9d69098391f1ad22107.1667113164.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1682357wru; Sun, 30 Oct 2022 00:34:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5FKYO+5JMW5Sw8N1M7d/8VEZ4TTLnvyXQf3RRZuFnuRSbevnWMOMVxcU38HcfEYHe2gcki X-Received: by 2002:a17:907:9495:b0:78e:1bee:5919 with SMTP id dm21-20020a170907949500b0078e1bee5919mr7080789ejc.701.1667115272377; Sun, 30 Oct 2022 00:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115272; cv=none; d=google.com; s=arc-20160816; b=J7k5CK3bGT/bNwI0NhIhB9rIRfG1z8mIld9eDG3WoOstbtw9h2pehaTgySx7BrkmGN URl+Q5Ipa6ys/h6mUw441ebSh/F+j6ahNBBGoJuS2n5HukWoN1mQIPIgHBQbqRqq2S6U xBWZ3jOCQOUroOGGN5e/XCcUK0EJ0UFTvj1clpBHLeA+f7DrNoFokVmx8WY8BCx0j9f7 TDnT/055OLmGz51AO2EdwMVQi8hW3D7kVlJbjKjJWt5Ul3S/LOFvR+fKZf4tZjAjNvQQ 9bGeuriUCOCsbc80guykrDt07JAT5Ra1WsOTEwLujkxkn/f2WXUtTwQnP14FCPCurwd+ V+/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=gE3iPqhk975/KCyzBnVpdpVXJ7ySmSctEoaoM09liNw=; b=KkGAqaPyJeu94wVuT3DE1zkhMoWJVoA/aXPU8tz78cT1EzrPUe3Dp8zemRzFcJTJGT S+CtZRDBV34OYOmMdmCDM9E4kqG+YpdnfYFgvY2iI3STTxoylshAdoVHNy0HDT6Ytj2Y HuM+OEA/6hZpxSvSEpqSzyVrVRDLYEz6KAZ0JBJRLvJEVDhCxdNu1mOQWzEn99NbrqRv 1oAzA/aynKemJ+OTDcHl2D7/AicFPt7bZV7B59TCorNyGBtTua5Op9GLHvOPbsjOLict ZRsfD5ne0A1rVTmOUDFMTMC4WbWmmiDCyw4S2w86yILLMYH/rCKjYqquEX2E0yZOgXhA G6Aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fy15-20020a1709069f0f00b0073d5a794b43si2965094ejc.985.2022.10.30.00.34.05; Sun, 30 Oct 2022 00:34:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229574AbiJ3HAR (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Sun, 30 Oct 2022 03:00:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiJ3HAO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 30 Oct 2022 03:00:14 -0400 Received: from smtp.smtpout.orange.fr (smtp-13.smtpout.orange.fr [80.12.242.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31F7E6380 for <linux-kernel@vger.kernel.org>; Sun, 30 Oct 2022 00:00:09 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id p2IeoVZUdBDYDp2IfocVDE; Sun, 30 Oct 2022 08:00:07 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 30 Oct 2022 08:00:07 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: Marcel Holtmann <marcel@holtmann.org>, Johan Hedberg <johan.hedberg@gmail.com>, Luiz Augusto von Dentz <luiz.dentz@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, Luiz Augusto von Dentz <luiz.von.dentz@intel.com>, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH] Bluetooth: Fix EALREADY and ELOOP cases in bt_status() Date: Sun, 30 Oct 2022 08:00:03 +0100 Message-Id: <9a1270540f0c2db13e81a9d69098391f1ad22107.1667113164.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748097064148372800?= X-GMAIL-MSGID: =?utf-8?q?1748097064148372800?= |
Series |
Bluetooth: Fix EALREADY and ELOOP cases in bt_status()
|
|
Commit Message
Christophe JAILLET
Oct. 30, 2022, 7 a.m. UTC
'err' is known to be <0 at this point.
So, some cases can not be reached because of a missing "-".
Add it.
Fixes: ca2045e059c3 ("Bluetooth: Add bt_status")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
net/bluetooth/lib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>: On Sun, 30 Oct 2022 08:00:03 +0100 you wrote: > 'err' is known to be <0 at this point. > > So, some cases can not be reached because of a missing "-". > Add it. > > Fixes: ca2045e059c3 ("Bluetooth: Add bt_status") > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > > [...] Here is the summary with links: - Bluetooth: Fix EALREADY and ELOOP cases in bt_status() https://git.kernel.org/bluetooth/bluetooth-next/c/8fceb58d84ab You are awesome, thank you!
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c index 469a0c95b6e8..53a796ac078c 100644 --- a/net/bluetooth/lib.c +++ b/net/bluetooth/lib.c @@ -170,7 +170,7 @@ __u8 bt_status(int err) case -EMLINK: return 0x09; - case EALREADY: + case -EALREADY: return 0x0b; case -EBUSY: @@ -191,7 +191,7 @@ __u8 bt_status(int err) case -ECONNABORTED: return 0x16; - case ELOOP: + case -ELOOP: return 0x17; case -EPROTONOSUPPORT: