diff options
author | Jiasheng Jiang <jiasheng@iscas.ac.cn> | 2022-06-03 04:24:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-21 16:15:49 +0300 |
commit | 0c5dbac1ce7f82db4472b47e73654a8856fb707a (patch) | |
tree | 8dc04ff5ebd27bec00c84b85b4f10f9bcd75fcf8 /drivers/bluetooth | |
parent | a7a7488cb15a8ff3af6185907a44ac7c8d8c50c1 (diff) | |
download | linux-0c5dbac1ce7f82db4472b47e73654a8856fb707a.tar.xz |
Bluetooth: hci_intel: Add check for platform_driver_register
[ Upstream commit ab2d2a982ff721f4b029282d9a40602ea46a745e ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/bluetooth')
-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 b20a40fab83e..d5d2feef6c52 100644 --- a/drivers/bluetooth/hci_intel.c +++ b/drivers/bluetooth/hci_intel.c @@ -1214,7 +1214,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); } |