Commit ab2d2a98 authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by Luiz Augusto von Dentz

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: 1ab1f239 ("Bluetooth: hci_intel: Add support for platform driver")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 629f66aa
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment