Commit b8093157 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Luiz Augusto von Dentz

Bluetooth: hci_qca: unduplicate calls to hci_uart_register_device()

Now that all three branches of the switch end up doing the same thing,
we can move the call to hci_uart_register_device() past it and unify the
error message.
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent b80f4e3b
......@@ -2396,12 +2396,6 @@ static int qca_serdev_probe(struct serdev_device *serdev)
dev_err(&serdev->dev, "failed to acquire clk\n");
return PTR_ERR(qcadev->susclk);
}
err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
if (err) {
BT_ERR("wcn3990 serdev registration failed");
return err;
}
break;
case QCA_QCA6390:
......@@ -2409,12 +2403,6 @@ static int qca_serdev_probe(struct serdev_device *serdev)
"bluetooth");
if (IS_ERR(qcadev->bt_power->pwrseq))
return PTR_ERR(qcadev->bt_power->pwrseq);
err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
if (err) {
BT_ERR("qca6390 serdev registration failed");
return err;
}
break;
default:
......@@ -2447,12 +2435,13 @@ static int qca_serdev_probe(struct serdev_device *serdev)
if (err)
return err;
}
err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
if (err) {
BT_ERR("Rome serdev registration failed");
BT_ERR("serdev registration failed");
return err;
}
}
hdev = qcadev->serdev_hu.hdev;
......
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