From: Daeseok Youn Date: Thu, 8 May 2014 22:57:18 +0000 (-0300) Subject: [media] s2255drv: fix memory leak s2255_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e21c94e772a34c3dec920e8e5ad313f4f3d77147;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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);