diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/cg2900/devices-cg2900.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/staging/cg2900/devices-cg2900.c b/drivers/staging/cg2900/devices-cg2900.c index 4a13094a955..a2bd2c92f9c 100644 --- a/drivers/staging/cg2900/devices-cg2900.c +++ b/drivers/staging/cg2900/devices-cg2900.c @@ -181,7 +181,7 @@ static int dcg2900_init(struct cg2900_chip_dev *dev) "%s: Failed to get regulator '%s'\n", __func__, pdata->regulator_id); info->regulator_wlan = NULL; - goto err_handling; + goto err_handling_free_gpios; } /* Enable it also */ err = regulator_enable(info->regulator_wlan); @@ -201,6 +201,14 @@ finished: return 0; err_handling_put_reg: regulator_put(info->regulator_wlan); +err_handling_free_gpios: + if (info->bt_gpio != -1) + gpio_free(info->bt_gpio); + if (info->pmuen_gpio != -1) + gpio_free(info->pmuen_gpio); + if (info->gbf_gpio != -1) + gpio_free(info->gbf_gpio); + err_handling: kfree(info); return err; |