lkml.org 
[lkml]   [2013]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] mfd: palmas: fix resource leak of i2c_dummy devices
On Thu, 26 Sep 2013, Laxman Dewangan wrote:

> Palmas device supports multiple i2c device address and the client
> for these addressed are created in the driver as i2c_new_dummy().
>
> The new devices are not getting released in error or removal path and
> so it is causing resource leak.
>
> Add the unregister of these newly created dummy devices to avoid resource
> leaks.
>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> ---
> drivers/mfd/palmas.c | 21 +++++++++++++++------
> 1 files changed, 15 insertions(+), 6 deletions(-)

Patch looks sane.

> no_irq:
> slave = PALMAS_BASE_TO_SLAVE(PALMAS_PU_PD_OD_BASE);
> @@ -552,7 +552,6 @@ no_irq:
> } else if (pdata->pm_off && !pm_power_off) {
> palmas_dev = palmas;
> pm_power_off = palmas_power_off;
> - return ret;
> }
> }

Sneaky! ;)

Applied, thanks.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-09-27 10:21    [W:0.064 / U:1.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site