From: Alexey Khoroshilov Date: Fri, 10 Jan 2014 21:22:11 +0000 (+0400) Subject: staging: wlan-ng: fix leaks on failure paths in prism2sta_probe_usb() X-Git-Tag: v3.14-rc1~150^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b76ed59f75d646466eaf60cd73aa4d935ff7dbef;p=pandora-kernel.git staging: wlan-ng: fix leaks on failure paths in prism2sta_probe_usb() There are leaks of resources allocated by wlan_setup() and usb_dev refcnt on failure paths in prism2sta_probe_usb(). The patch adds appropriate deallocations and removes invalid code from hfa384x_corereset() failure handling. unregister_wlandev() is wrong because it is not registered yet. hfa384x_destroy() is just noop in init state. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed