isight_firmware: fix a leak and double kfree()

Signed-off-by: Parag Warudkar <parag.warudkar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Parag Warudkar 2008-08-12 15:08:46 -07:00 committed by Linus Torvalds
parent 66198f36aa
commit ff1a4a7b14

View File

@ -48,7 +48,8 @@ static int isight_firmware_load(struct usb_interface *intf,
if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) {
printk(KERN_ERR "Unable to load isight firmware\n");
return -ENODEV;
ret = -ENODEV;
goto out;
}
ptr = firmware->data;
@ -91,7 +92,6 @@ static int isight_firmware_load(struct usb_interface *intf,
buf, llen, 300) != llen) {
printk(KERN_ERR
"Failed to load isight firmware\n");
kfree(buf);
ret = -ENODEV;
goto out;
}