Re: [patch] backlight/88pm860x_bl: potential memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2010-05-07 at 11:06 +0200, Dan Carpenter wrote:
> I added a kfree() on the error path.  I don't really expect it to affect
> anyone, but it's easy and makes the static checkers happy.
> 
> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
> 
> diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c
> index 68d2518..78d8fde 100644
> --- a/drivers/video/backlight/88pm860x_bl.c
> +++ b/drivers/video/backlight/88pm860x_bl.c
> @@ -222,6 +222,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev)
>  	data->port = __check_device(pdata, name);
>  	if (data->port < 0) {
>  		dev_err(&pdev->dev, "wrong platform data is assigned");
> +		kfree(data);
>  		return -EINVAL;
>  	}
>  

Queued in the backlight tree, thanks.


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux