[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>
This commit is contained in:
Daeseok Youn 2014-05-08 19:57:18 -03:00 committed by Mauro Carvalho Chehab
parent 30616fff65
commit e21c94e772
1 changed files with 1 additions and 1 deletions

View File

@ -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);