summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2013-02-06 12:54:17 -0600
committerJohn W. Linville <linville@tuxdriver.com>2013-02-08 14:51:34 -0500
commit957f4aca5fa0db69635271bc4621cc0b65b2d590 (patch)
treeafccf897b7a9d6e91c028f66a851ce0631ca64f2 /drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
parentcbb1ec9491fdbd3aa9dee6ad9a3bcb05bdfd279d (diff)
downloadop-kernel-dev-957f4aca5fa0db69635271bc4621cc0b65b2d590.zip
op-kernel-dev-957f4aca5fa0db69635271bc4621cc0b65b2d590.tar.gz
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>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192cu/sw.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/sw.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
index d9e659f..577c0dc 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
@@ -363,9 +363,15 @@ static struct usb_device_id rtl8192c_usb_ids[] = {
MODULE_DEVICE_TABLE(usb, rtl8192c_usb_ids);
+static int rtl8192cu_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ return rtl_usb_probe(intf, id, &rtl92cu_hal_cfg);
+}
+
static struct usb_driver rtl8192cu_driver = {
.name = "rtl8192cu",
- .probe = rtl_usb_probe,
+ .probe = rtl8192cu_probe,
.disconnect = rtl_usb_disconnect,
.id_table = rtl8192c_usb_ids,
OpenPOWER on IntegriCloud