rtlwifi: rtl8192cu: Fix NULL dereference BUG when using new_id
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 6 Feb 2013 18:54:17 +0000 (12:54 -0600)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 8 Feb 2013 19:51:34 +0000 (14:51 -0500)
commit957f4aca5fa0db69635271bc4621cc0b65b2d590
treeafccf897b7a9d6e91c028f66a851ce0631ca64f2
parentcbb1ec9491fdbd3aa9dee6ad9a3bcb05bdfd279d
rtlwifi: rtl8192cu: Fix NULL dereference BUG when using new_id

When the new_id entry in /sysfs is used for a foreign USB device, rtlwifi
BUGS with a NULL pointer dereference because the per-driver configuration
data is not available. The probe function has been restructured as
suggested by Ben Hutchings <bhutchings@solarflare.com>.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
drivers/net/wireless/rtlwifi/usb.c
drivers/net/wireless/rtlwifi/usb.h