[media] s2255drv: memory leak fix
authorsensoray-dev <linux-dev@sensoray.com>
Fri, 28 Feb 2014 22:19:44 +0000 (19:19 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 11 Mar 2014 12:28:31 +0000 (09:28 -0300)
Fixes memory leak introduced by
commit 47d8c881c304642a68d398b87d9e8846e643c81a.

Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/s2255/s2255drv.c

index 4c7513af2450fa3a0f1270d14de31ef3cd8b2f04..1d4ba2b804908f9373de73100ccca4289032295b 100644 (file)
@@ -2175,11 +2175,6 @@ static int s2255_stop_acquire(struct s2255_vc *vc)
 
        mutex_lock(&dev->cmdlock);
        chn_rev = G_chnmap[vc->idx];
-       buffer = kzalloc(512, GFP_KERNEL);
-       if (buffer == NULL) {
-               dev_err(&dev->udev->dev, "out of mem\n");
-               return -ENOMEM;
-       }
        /* send the stop command */
        buffer[0] = IN_DATA_TOKEN;
        buffer[1] = (__le32) cpu_to_le32(chn_rev);