rtl8xxxu: Fix OOPS if user tries to add device via /sys
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 14 Apr 2016 20:37:18 +0000 (16:37 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 15 Apr 2016 18:38:14 +0000 (21:38 +0300)
commit6a62f9d5273dbc8ec776717a73a8a223b9e5f38e
treeffedd5e1e4e90e2138ca1e118bf76cb6c552ffda
parentcabb550e2b97b8ea42124a93d4665ca052f3e3ff
rtl8xxxu: Fix OOPS if user tries to add device via /sys

This driver relies on driver_info in struct usb_device_id, so allowing
adding a device via /sys/bus/usb/drivers/rtl8xxxu/new_id will cause a
NULL pointer dereference.

Set .no_dynamic_id = 1 to disable hot add of USB IDs.

Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c