aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/s2255
diff options
context:
space:
mode:
authorDaeseok Youn <daeseok.youn@gmail.com>2014-05-08 19:57:18 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-23 12:19:42 -0300
commite21c94e772a34c3dec920e8e5ad313f4f3d77147 (patch)
treefb0fd4f719c0e3d6671630567011b5432ae1b656 /drivers/media/usb/s2255
parent[media] timblogiw: Introduce the use of the managed version of kzalloc (diff)
downloadlinux-dev-e21c94e772a34c3dec920e8e5ad313f4f3d77147.tar.xz
linux-dev-e21c94e772a34c3dec920e8e5ad313f4f3d77147.zip
[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 <daeseok.youn@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/s2255')
-rw-r--r--drivers/media/usb/s2255/s2255drv.c2
1 files changed, 1 insertions, 1 deletions
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);