summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/isight_firmware.c
diff options
context:
space:
mode:
authorParag Warudkar <parag.warudkar@gmail.com>2008-08-13 00:08:46 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-13 01:07:28 +0200
commitff1a4a7b14ae146142b1c93a001304caf662ae13 (patch)
treeb9fb32e4d408f22305ed840373288a60220fb1ea /drivers/usb/misc/isight_firmware.c
parentcpuidle: make sysfs attributes sysdev class attributes (diff)
downloadlinux-ff1a4a7b14ae146142b1c93a001304caf662ae13.tar.xz
linux-ff1a4a7b14ae146142b1c93a001304caf662ae13.zip
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>
Diffstat (limited to 'drivers/usb/misc/isight_firmware.c')
-rw-r--r--drivers/usb/misc/isight_firmware.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c
index d94aa7387608..b897f6554ecd 100644
--- a/drivers/usb/misc/isight_firmware.c
+++ b/drivers/usb/misc/isight_firmware.c
@@ -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;
}