Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp1449596rwj; Sun, 30 Oct 2022 00:33:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7m+hC8RqvpbZgcZRL6Id/B3hY9o+IU235drOp7+9Bmh5Aplym+/iVo67SmqDnN2TGLNwmF X-Received: by 2002:a63:2547:0:b0:46f:793f:197b with SMTP id l68-20020a632547000000b0046f793f197bmr7359608pgl.35.1667115219523; Sun, 30 Oct 2022 00:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667115219; cv=none; d=google.com; s=arc-20160816; b=lRgTQYjObm/NeEmaBJcLCVTm9HzFAzLwIU0H5bbWBzPFKmRvw9dhAATu/O0NsRndMK OXotmdRbLsSMMi7rqAKzpdH+FuSz8GNgtJ51P9/S7/rDhLP1od0elpvwwRh3GITxmu+n eDYSOaN7JUZd9cB5Em54Ctmfmsy+U64s784vzWkl6+mxby+vAOg0JKQVLyHEtey0s9Md uOCL0t4v8BMKgqoSY686I6G6jvvCbcxX3NGTzfssHyzFc4p8BD4V7eko4ZBsIHH4ffii sgQ4k3KEh5aessegPwv3C1Pai8M6Ojt9AM9IHt7SpMt/uQDnxfXJ8DNIJQPTB+Fi08cp V45g== 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=c+c6zzAtJJqXRKBZPR2Cmvzgfqx85QrxFz4zgV5tM6cc2kMow/cXBG4GUSc8yLO0id ngZzpBh87PWGm1e0vAw6dzP9SFwC356tNkY28pFRwBLo0wJajIEgFJsNN2mLGLucV624 w1uqZhMnZO7kp3SWGdAzWRt89D48+QXT23E5Bh0RwNK3psGYyimBVEJSsZHApFP1QBGB of8acTgAJGI5kIZtY1XcyturWOaFLSbtAylbTyBgp5ysY38MBsprvya77DH/StRM2Abd ConU+n+KCJsOUc67NJPiyASUtVRuuTAW8gF5cNZw45L85zVJP0+LUAZsHXn95Yy336De T28g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020a17090282c900b0016f9420a15asi4271217plz.168.2022.10.30.00.33.07; Sun, 30 Oct 2022 00:33:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-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-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbiJ3HHt (ORCPT + 99 others); Sun, 30 Oct 2022 03:07:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiJ3HHs (ORCPT ); Sun, 30 Oct 2022 03:07:48 -0400 X-Greylist: delayed 454 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 30 Oct 2022 00:07:47 PDT Received: from smtp.smtpout.orange.fr (smtp-13.smtpout.orange.fr [80.12.242.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 99E4A22E for ; Sun, 30 Oct 2022 00:07:47 -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 To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , Luiz Augusto von Dentz , 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=unavailable 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: X-Mailing-List: linux-bluetooth@vger.kernel.org '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 --- net/bluetooth/lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.34.1