Re: [PATCH] [media] s2255drv: fix memory leak s2255_probe()

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

 



Hi Daeseok,

Thanks for the update! :-)

On Fri, May 09, 2014 at 07:57:18AM +0900, Daeseok Youn wrote:
> smatch says:
>  drivers/media/usb/s2255/s2255drv.c:2246 s2255_probe() warn:
> possible memory leak of 'dev'
> 
> Signed-off-by: Daeseok Youn <daeseok.youn@xxxxxxxxx>
> ---
> V2: use the same pattern for error handling.
> 
>  drivers/media/usb/s2255/s2255drv.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
> index 1d4ba2b..3193474 100644
> --- a/drivers/media/usb/s2255/s2255drv.c
> +++ b/drivers/media/usb/s2255/s2255drv.c
> @@ -2243,7 +2243,7 @@ static int s2255_probe(struct usb_interface *interface,
>  	dev->cmdbuf = kzalloc(S2255_CMDBUF_SIZE, GFP_KERNEL);
>  	if (dev->cmdbuf == NULL) {
>  		s2255_dev_err(&interface->dev, "out of memory\n");
> -		return -ENOMEM;
> +		goto errorFWDATA1;
>  	}
>  
>  	atomic_set(&dev->num_channels, 0);

Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@xxxxxx	XMPP: sailus@xxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux