summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_h5.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-09-24 11:41:06 +0200
committerMarcel Holtmann <marcel@holtmann.org>2021-09-24 11:48:02 +0200
commit6fc165337b0d06670b3b266fc217dd72b080c870 (patch)
tree32da83fec5bc2fa314459844bfdba885ad0a2c66 /drivers/bluetooth/hci_h5.c
parent9a9023f314873241a43b5a2b96e9c0caaa958433 (diff)
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>
Diffstat (limited to 'drivers/bluetooth/hci_h5.c')
-rw-r--r--drivers/bluetooth/hci_h5.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index d49a39d17d7d..34286ffe0568 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -816,7 +816,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)
@@ -860,11 +859,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)