mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
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>
This commit is contained in:
parent
629f66aaca
commit
ab2d2a982f
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user