summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorJiasheng Jiang <jiasheng@iscas.ac.cn>2022-06-03 09:24:36 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 11:15:11 +0200
commit1958ef4767c017dbc7b9dc5b379a7ae1e6532088 (patch)
tree5b34b94e9b5e0bf17b30f3ae560f50822ddf621d /drivers/bluetooth
parent5cc6acf7fab5fbf442bdf7a53e32a6ceed2ef751 (diff)
downloadlinux-stable-1958ef4767c017dbc7b9dc5b379a7ae1e6532088.tar.gz
linux-stable-1958ef4767c017dbc7b9dc5b379a7ae1e6532088.tar.bz2
linux-stable-1958ef4767c017dbc7b9dc5b379a7ae1e6532088.zip
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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c
index e9228520e4c7..727fa4347b1e 100644
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
@@ -1253,7 +1253,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);
}