From: sensoray-dev Date: Fri, 28 Feb 2014 22:19:44 +0000 (-0300) Subject: [media] s2255drv: memory leak fix X-Git-Tag: v4.14-rc1~7191^2~443 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a1df5e8f6712df3b5f8aeb09771a1169ddd8e8c;p=platform%2Fkernel%2Flinux-rpi.git [media] s2255drv: memory leak fix Fixes memory leak introduced by commit 47d8c881c304642a68d398b87d9e8846e643c81a. Signed-off-by: Dean Anderson 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 4c7513a..1d4ba2b 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -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);