From: Amitkumar Karwar Date: Thu, 1 Jan 2015 08:13:40 +0000 (-0800) Subject: Bluetooth: btmrvl: error path handling in setup handler X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b89fdfee47de2d5d904a36cb85304e1ba80934d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Marcel Holtmann --- 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;