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:
parent
66198f36aa
commit
ff1a4a7b14
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue