summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656/main_usb.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-03-17 07:44:08 (GMT)
committerPaul Mundt <lethal@linux-sh.org>2011-03-17 07:44:08 (GMT)
commit1d2a1959fe534279cf37aba20b08c24c20840e52 (patch)
tree67c0b9aa7fe22a44bf0b4af88947799203eb8f67 /drivers/staging/vt6656/main_usb.c
parent5a79ce76e9bb8f4b2cd8106ee36d15ee05013bcf (diff)
parent054cfaacf88865bff1dd58d305443d5d6c068a08 (diff)
downloadlinux-1d2a1959fe534279cf37aba20b08c24c20840e52.tar.xz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Diffstat (limited to 'drivers/staging/vt6656/main_usb.c')
-rw-r--r--drivers/staging/vt6656/main_usb.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 7cc3d24..af14ab0 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -837,8 +837,7 @@ static void device_free_tx_bufs(PSDevice pDevice)
usb_kill_urb(pTxContext->pUrb);
usb_free_urb(pTxContext->pUrb);
}
- if (pTxContext)
- kfree(pTxContext);
+ kfree(pTxContext);
}
return;
}
@@ -861,8 +860,7 @@ static void device_free_rx_bufs(PSDevice pDevice)
if (pRCB->skb)
dev_kfree_skb(pRCB->skb);
}
- if (pDevice->pRCBMem)
- kfree(pDevice->pRCBMem);
+ kfree(pDevice->pRCBMem);
return;
}
@@ -878,8 +876,7 @@ static void usb_device_reset(PSDevice pDevice)
static void device_free_int_bufs(PSDevice pDevice)
{
- if (pDevice->intBuf.pDataBuf != NULL)
- kfree(pDevice->intBuf.pDataBuf);
+ kfree(pDevice->intBuf.pDataBuf);
return;
}
@@ -1272,6 +1269,9 @@ static void __devexit vt6656_disconnect(struct usb_interface *intf)
device_release_WPADEV(device);
+ if (device->firmware)
+ release_firmware(device->firmware);
+
usb_set_intfdata(intf, NULL);
usb_put_dev(interface_to_usbdev(intf));
@@ -1454,7 +1454,7 @@ static unsigned char *Config_FileOperation(PSDevice pDevice)
buffer = kmalloc(1024, GFP_KERNEL);
if(buffer==NULL) {
- printk("alllocate mem for file fail?\n");
+ printk("allocate mem for file fail?\n");
result = -1;
goto error1;
}
@@ -1477,8 +1477,7 @@ error2:
*/
if(result!=0) {
- if(buffer)
- kfree(buffer);
+ kfree(buffer);
buffer=NULL;
}
return buffer;