Skip to content

Commit

Permalink
isight_firmware: fix a leak and double kfree()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Parag Warudkar authored and Linus Torvalds committed Aug 12, 2008
1 parent 66198f3 commit ff1a4a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/misc/isight_firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit ff1a4a7

Please sign in to comment.