From: Daeseok Youn Date: Thu, 8 May 2014 22:57:18 +0000 (-0300) Subject: [media] s2255drv: fix memory leak s2255_probe() X-Git-Tag: next-20140530~82^2~4^2~111 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e21c94e772a34c3dec920e8e5ad313f4f3d77147;p=karo-tx-linux.git [media] s2255drv: fix memory leak s2255_probe() smatch says: drivers/media/usb/s2255/s2255drv.c:2246 s2255_probe() warn: possible memory leak of 'dev' Signed-off-by: Daeseok Youn Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index 185be72cab14..a44466bc7b86 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -2242,7 +2242,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);