UBUNTU: SAUCE: wcnss_wlan: don't free penv when it fails to trigger config

Otherwise you'll get a null pointer if you try to trigger config again.

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
This commit is contained in:
Ricardo Salveti de Araujo
2014-02-17 10:51:11 -03:00
committed by Andy Whitcroft
parent c69e9d69ce
commit b0e1aeb581

View File

@@ -855,6 +855,8 @@ wcnss_trigger_config(struct platform_device *pdev)
return 0; return 0;
penv->triggered = 1; penv->triggered = 1;
pr_info(DEVICE " %s: triggering config\n", __func__);
/* initialize the WCNSS device configuration */ /* initialize the WCNSS device configuration */
pdata = pdev->dev.platform_data; pdata = pdev->dev.platform_data;
if (WCNSS_CONFIG_UNSPECIFIED == has_48mhz_xo) if (WCNSS_CONFIG_UNSPECIFIED == has_48mhz_xo)
@@ -940,8 +942,7 @@ fail_pil:
fail_power: fail_power:
wcnss_gpios_config(penv->gpios_5wire, false); wcnss_gpios_config(penv->gpios_5wire, false);
fail_gpio_res: fail_gpio_res:
kfree(penv); penv->triggered = 0;
penv = NULL;
return ret; return ret;
} }