Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp117232rdb; Thu, 5 Oct 2023 19:48:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErbCnDq08z3vTjES47J49vpm5w/20knFUmivkCgavgcE+N7U8BKHn8hG2tpsDMPTfcM2D8 X-Received: by 2002:a81:80c7:0:b0:59b:eba:f94b with SMTP id q190-20020a8180c7000000b0059b0ebaf94bmr7812165ywf.40.1696560512922; Thu, 05 Oct 2023 19:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696560512; cv=none; d=google.com; s=arc-20160816; b=nXKn/IqQVc4XduMYoyruQs8fQynCJkEbgVncnimvWh05qBeseNx8+yMhs17JKjOIeV DqRsiospRHaJKNMSocqTfXgVQqpfJkeH5yz+uoTcDYVBKqrVQ5IFT1vLMFUSSOzwISUF owi/t60QzOK1KTZajX0cKnRj5+z2NX9JSY1AUhhO1EyTbdZWC42Jgvcb8jvF/2nFf2LN RsrC7fRFCZU1BCS7UVyZT5zzvnTgR1sKaL1TFTIWV3u+jXXXLKaWUp0lmd515lQqOihS AOAHyfRuz+UbzIsaN7FHcpo4550NTokF2L5/HzjyF1BuaGcSrSn57wmBPQ7PgOaEchc8 +GNQ== 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=DUeLm5JwQLXmxu8S+f7pLozbLxumhIQAQSzqhZCIIxg=; fh=04Mqf2B4x4LcDG4AY1V0js7QJJWlnkaXbK7A5rAWOp4=; b=QP2vrWm3VKB6x1YlRWslc6FiPCDAF3CbFmTP+koo4TCz0hlRd2WA9S6v6ZVZ47lztu L+HBoAnt2Xe4X0JXkhtqku0VdI6D33ForyPioowKvpMssinCxLzz8V+xDT0vcisJOxPM LaFOIYlShijS7DaCPHu1QnG/1+5FuOT2lL7jSfW6t2lefAmChBV6BwUnawbsD7rQVGqX hNlfoY8wrn3tUKnuedAgjNb2CBNRp+C7kdPQsLFE24q9cLcQmODAuzuCISrAgLzFbAUX FbIbXChb3voi5kpLaMTdkdmWk+PhzCtZLD67LF04S1gxJxXAbNZuPMYF4J8F6WvYDeps 4lcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id 7-20020a630f47000000b00585a61651ecsi2698591pgp.318.2023.10.05.19.48.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 19:48:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C7D4A83726BF; Thu, 5 Oct 2023 19:48:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbjJFCrq (ORCPT + 99 others); Thu, 5 Oct 2023 22:47:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjJFCrp (ORCPT ); Thu, 5 Oct 2023 22:47:45 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D4ECD6; Thu, 5 Oct 2023 19:47:42 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3962lCOb91244999, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.92/5.92) with ESMTPS id 3962lCOb91244999 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 6 Oct 2023 10:47:15 +0800 Received: from RTEXMBS03.realtek.com.tw (172.21.6.96) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Fri, 6 Oct 2023 10:47:12 +0800 Received: from localhost.localhost (172.21.132.123) by RTEXMBS03.realtek.com.tw (172.21.6.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 6 Oct 2023 10:47:11 +0800 From: To: CC: , , , , , , , , , , Subject: [PATCH] Bluetooth: btrtl: Ignore error return for hci_devcd_register() Date: Fri, 6 Oct 2023 10:47:07 +0800 Message-ID: <20231006024707.413349-1-max.chou@realtek.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.132.123] X-ClientProxiedBy: RTEXH36505.realtek.com.tw (172.21.6.25) To RTEXMBS03.realtek.com.tw (172.21.6.96) X-KSE-ServerInfo: RTEXMBS03.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,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: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 05 Oct 2023 19:48:31 -0700 (PDT) From: Max Chou If CONFIG_DEV_COREDUMP was not set, it would return -EOPNOTSUPP for hci_devcd_register(). In this commit, ignore error return for hci_devcd_register(). Otherwise Bluetooth initialization will be failed. Fixes: 044014ce85a1 ("Bluetooth: btrtl: Add Realtek devcoredump support") Cc: stable@vger.kernel.org Reported-by: Kirill A. Shutemov Closes: https://lore.kernel.org/all/ZRyqIn0_qqEFBPdy@debian.me/T/ Signed-off-by: Max Chou --- drivers/bluetooth/btrtl.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 84c2c2e1122f..277d039ecbb4 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -962,13 +962,10 @@ static void btrtl_dmp_hdr(struct hci_dev *hdev, struct sk_buff *skb) skb_put_data(skb, buf, strlen(buf)); } -static int btrtl_register_devcoredump_support(struct hci_dev *hdev) +static void btrtl_register_devcoredump_support(struct hci_dev *hdev) { - int err; + hci_devcd_register(hdev, btrtl_coredump, btrtl_dmp_hdr, NULL); - err = hci_devcd_register(hdev, btrtl_coredump, btrtl_dmp_hdr, NULL); - - return err; } void btrtl_set_driver_name(struct hci_dev *hdev, const char *driver_name) @@ -1255,8 +1252,7 @@ int btrtl_download_firmware(struct hci_dev *hdev, } done: - if (!err) - err = btrtl_register_devcoredump_support(hdev); + btrtl_register_devcoredump_support(hdev); return err; } -- 2.34.1