diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2015-01-01 00:13:40 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-01-06 16:19:35 +0100 |
commit | 9b89fdfee47de2d5d904a36cb85304e1ba80934d (patch) | |
tree | ab49d49777fd6abf719b80860f7de075d0ef52b8 /drivers/bluetooth | |
parent | 8b324fa6915bf4ad7d28e58a5a004f16e470e58d (diff) |
Bluetooth: btmrvl: error path handling in setup handler
If module init command fails, FW might not be in good state.
We will return from setup handler and skip downloading further
commands.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/btmrvl_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index e3f5711c6690..c435b58db597 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c @@ -538,8 +538,11 @@ static int btmrvl_check_device_tree(struct btmrvl_private *priv) static int btmrvl_setup(struct hci_dev *hdev) { struct btmrvl_private *priv = hci_get_drvdata(hdev); + int ret; - btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); + ret = btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); + if (ret) + return ret; priv->btmrvl_dev.gpio_gap = 0xffff; |