Commit ff1a4a7b authored by Parag Warudkar's avatar Parag Warudkar Committed by Linus Torvalds

isight_firmware: fix a leak and double kfree()

Signed-off-by: default avatarParag Warudkar <parag.warudkar@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 66198f36
...@@ -48,7 +48,8 @@ static int isight_firmware_load(struct usb_interface *intf, ...@@ -48,7 +48,8 @@ static int isight_firmware_load(struct usb_interface *intf,
if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) { if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) {
printk(KERN_ERR "Unable to load isight firmware\n"); printk(KERN_ERR "Unable to load isight firmware\n");
return -ENODEV; ret = -ENODEV;
goto out;
} }
ptr = firmware->data; ptr = firmware->data;
...@@ -91,7 +92,6 @@ static int isight_firmware_load(struct usb_interface *intf, ...@@ -91,7 +92,6 @@ static int isight_firmware_load(struct usb_interface *intf,
buf, llen, 300) != llen) { buf, llen, 300) != llen) {
printk(KERN_ERR printk(KERN_ERR
"Failed to load isight firmware\n"); "Failed to load isight firmware\n");
kfree(buf);
ret = -ENODEV; ret = -ENODEV;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment