diff options
author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2022-06-03 09:24:36 +0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-07-21 17:05:10 -0700 |
commit | ab2d2a982ff721f4b029282d9a40602ea46a745e (patch) | |
tree | ad99ba1f21126b63539e4d6248a199f015d19598 /drivers/bluetooth/hci_intel.c | |
parent | 629f66aaca81ad713fb05f1d12acc827510601b3 (diff) | |
download | lwn-ab2d2a982ff721f4b029282d9a40602ea46a745e.tar.gz lwn-ab2d2a982ff721f4b029282d9a40602ea46a745e.zip |
Bluetooth: hci_intel: Add check for platform_driver_register
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>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_intel.c')
-rw-r--r-- | drivers/bluetooth/hci_intel.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |