Bluetooth: hci_h5: directly return hci_uart_register_device() ret-val
PATCH 1/1 Bluetooth: hci_h5: directly return hci_uart_register_device() ret-val
Since the hci_uart_register_device() call is the last thing we do in h5_serdev_probe() we can simply directly return its return-value.
Cc Archie Pusaka <[email protected]>
Suggested-by Archie Pusaka <[email protected]>
Signed-off-by Hans de Goede <[email protected]>
--- drivers/bluetooth/hci_h5.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/bluetooth/hci_h5.c +1 -6
@@ -814,7 +814,6 @@ static int h5_serdev_probe(struct serdev_device *serdev)struct device *dev = &serdev->dev;struct h5 *h5;const struct h5_device_data *data; -int err; h5 =devm_kzalloc (dev,sizeof (*h5),GFP_KERNEL );if (!h5)
@@ -858,11 +857,7 @@ static int h5_serdev_probe(struct serdev_device *serdev)if (IS_ERR (h5->device_wake_gpio))return PTR_ERR (h5->device_wake_gpio); - err =hci_uart_register_device (&h5->serdev_hu, &h5p); -if (err) -return err; - -return 0 ; +return hci_uart_register_device (&h5->serdev_hu, &h5p); }static void h5_serdev_remove (struct serdev_device *serdev)
Signature · 1 line
2.31.1
Hi,
I accidentally send this to the device-tree list instead of to the bluetooth list. So I'm going to resend this now to the right list.
Note the second copy you will receive is unchanged, I'm just fixing the Cc.
Regards,
Hans
Quoted 36 lines · Hans de Goede
Since the
hci_uart_register_device()call is the last thing we do inh5_serdev_probe()we can simply directly return its return-value.Cc Archie Pusaka <[email protected]>Suggested-by Archie Pusaka <[email protected]>Signed-off-by Hans de Goede <[email protected]>--- drivers/bluetooth/hci_h5.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)drivers/bluetooth/hci_h5.c +1
-6@@ -814,7 +814,6 @@ static int h5_serdev_probe(struct serdev_device *serdev)struct device *dev = &serdev->dev;struct h5 *h5;const struct h5_device_data *data; -int err; h5 =devm_kzalloc (dev,sizeof (*h5),GFP_KERNEL );if (!h5)@@ -858,11 +857,7 @@ static int h5_serdev_probe(struct serdev_device *serdev)if (IS_ERR (h5->device_wake_gpio))return PTR_ERR (h5->device_wake_gpio); - err =hci_uart_register_device (&h5->serdev_hu, &h5p); -if (err) -return err; - -return 0 ; +return hci_uart_register_device (&h5->serdev_hu, &h5p); }static void h5_serdev_remove (struct serdev_device *serdev)