* [PATCH v2] Bluetooth: hci_intel: Add check for platform_driver_register
@ 2022-06-03 1:24 Jiasheng Jiang
2022-06-03 8:10 ` patchwork-bot+bluetooth
0 siblings, 1 reply; 2+ messages in thread
From: Jiasheng Jiang @ 2022-06-03 1:24 UTC (permalink / raw)
To: marcel; +Cc: luiz.dentz, linux-bluetooth, linux-kernel, Jiasheng Jiang
As platform_driver_register() could fail, it should be better
to deal with the return value in order to maintain the code
consisitency.
Fixes: 1ab1f239bf17 ("Bluetooth: hci_intel: Add support for platform driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
Changelog:
v1 -> v2
*Change 1. Change "iBluetooth" to "Bluetooth" in title.
*Change 2. Change "ret" to "err" in code.
---
drivers/bluetooth/hci_intel.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index 7249b91d9b91..78afb9a348e7 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -1217,7 +1217,11 @@ static struct platform_driver intel_driver = {
int __init intel_init(void)
{
- platform_driver_register(&intel_driver);
+ int err;
+
+ err = platform_driver_register(&intel_driver);
+ if (err)
+ return err;
return hci_uart_register_proto(&intel_proto);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Bluetooth: hci_intel: Add check for platform_driver_register
2022-06-03 1:24 [PATCH v2] Bluetooth: hci_intel: Add check for platform_driver_register Jiasheng Jiang
@ 2022-06-03 8:10 ` patchwork-bot+bluetooth
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+bluetooth @ 2022-06-03 8:10 UTC (permalink / raw)
To: Jiasheng Jiang; +Cc: marcel, luiz.dentz, linux-bluetooth, linux-kernel
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Marcel Holtmann <marcel@holtmann.org>:
On Fri, 3 Jun 2022 09:24:36 +0800 you wrote:
> As platform_driver_register() could fail, it should be better
> to deal with the return value in order to maintain the code
> consisitency.
>
> Fixes: 1ab1f239bf17 ("Bluetooth: hci_intel: Add support for platform driver")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
>
> [...]
Here is the summary with links:
- [v2] Bluetooth: hci_intel: Add check for platform_driver_register
https://git.kernel.org/bluetooth/bluetooth-next/c/822e1b3ca0fb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-03 8:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 1:24 [PATCH v2] Bluetooth: hci_intel: Add check for platform_driver_register Jiasheng Jiang
2022-06-03 8:10 ` patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).