Re: [PATCH] mmc: host: Fix mmc_alloc_host() error path

2015-06-15 Thread Fabio Estevam
On Fri, Jun 12, 2015 at 4:22 AM, Adrian Hunter adrian.hun...@intel.com wrote: On 12/06/15 07:39, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com If mmc_gpio_alloc() fails we miss to call 'kfree(host)', so rearrange the error path to fix it. Are you sure it doesn't get

Re: [PATCH] mmc: host: Fix mmc_alloc_host() error path

2015-06-12 Thread Adrian Hunter
On 12/06/15 07:39, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com If mmc_gpio_alloc() fails we miss to call 'kfree(host)', so rearrange the error path to fix it. Are you sure it doesn't get freed through put_device()? Signed-off-by: Fabio Estevam

[PATCH] mmc: host: Fix mmc_alloc_host() error path

2015-06-11 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com If mmc_gpio_alloc() fails we miss to call 'kfree(host)', so rearrange the error path to fix it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- drivers/mmc/core/host.c | 18 ++ 1 file changed, 10 insertions(+), 8