From: <max.chou@realtek.com>
To: <marcel@holtmann.org>
Cc: <johan.hedberg@gmail.com>, <luiz.dentz@gmail.com>,
<linux-bluetooth@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<alex_lu@realsil.com.cn>, <hildawu@realtek.com>,
<max.chou@realtek.com>, <regressions@lists.linux.dev>,
<kirill@shutemov.name>, <bagasdotme@gmail.com>,
<linux@leemhuis.info>
Subject: [PATCH] Bluetooth: btrtl: Ignore error return for hci_devcd_register()
Date: Fri, 6 Oct 2023 10:47:07 +0800 [thread overview]
Message-ID: <20231006024707.413349-1-max.chou@realtek.com> (raw)
From: Max Chou <max.chou@realtek.com>
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 <kirill@shutemov.name>
Closes: https://lore.kernel.org/all/ZRyqIn0_qqEFBPdy@debian.me/T/
Signed-off-by: Max Chou <max.chou@realtek.com>
---
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
next reply other threads:[~2023-10-06 2:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 2:47 max.chou [this message]
2023-10-07 1:00 ` patchwork-bot+bluetooth
2023-10-16 8:07 ` Linux regression tracking (Thorsten Leemhuis)
2023-10-16 17:20 ` Luiz Augusto von Dentz
2023-10-17 6:04 ` Linux regression tracking (Thorsten Leemhuis)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231006024707.413349-1-max.chou@realtek.com \
--to=max.chou@realtek.com \
--cc=alex_lu@realsil.com.cn \
--cc=bagasdotme@gmail.com \
--cc=hildawu@realtek.com \
--cc=johan.hedberg@gmail.com \
--cc=kirill@shutemov.name \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=regressions@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®