Staging: vt6656: problems in error handling
authorDan Carpenter <error27@gmail.com>
Tue, 10 Aug 2010 06:00:12 +0000 (08:00 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 31 Aug 2010 18:35:06 +0000 (11:35 -0700)
commite3a92cdedf3584e20e13511aab252a82d715f927
treee3c1de974f9af9cb9d1c732637829c7c2612bb63
parentfe149785a468e15fb6583a6acf9c4bb28324efbd
Staging: vt6656: problems in error handling

The first kfree(pDevice) is pointless because pDevice is NULL.  The
second kfree(pDevice) is a double free because pDevice is the driver's
private data and that is already freed by free_netdev(netdev).  Also the
free_netdev() error path doesn't call usb_put_dev().

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vt6656/main_usb.c