Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <apusaka@google.com>
Suggested-by: Archie Pusaka <apusaka@google.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Hans de Goede and committed by
Marcel Holtmann
6fc16533 9a9023f3

+1 -6
+1 -6
drivers/bluetooth/hci_h5.c
··· 816 816 struct device *dev = &serdev->dev; 817 817 struct h5 *h5; 818 818 const struct h5_device_data *data; 819 - int err; 820 819 821 820 h5 = devm_kzalloc(dev, sizeof(*h5), GFP_KERNEL); 822 821 if (!h5) ··· 859 860 if (IS_ERR(h5->device_wake_gpio)) 860 861 return PTR_ERR(h5->device_wake_gpio); 861 862 862 - err = hci_uart_register_device(&h5->serdev_hu, &h5p); 863 - if (err) 864 - return err; 865 - 866 - return 0; 863 + return hci_uart_register_device(&h5->serdev_hu, &h5p); 867 864 } 868 865 869 866 static void h5_serdev_remove(struct serdev_device *serdev)