diff options
author | Thomas Pugliese <thomas.pugliese@gmail.com> | 2014-04-23 15:28:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-24 15:45:41 -0400 |
commit | bd130adacaf8cea179f9a700fb694f5be3b05bf0 (patch) | |
tree | 16afa8c2512d525c3d5acb371f4194c907a2ae8b | |
parent | 7584f2ebc18b6355f21be5fb2f75afbf3f781ce5 (diff) |
usb: wusbcore: fix panic in wusbhc_chid_set
If no valid CHID value has previously been set on an HWA, writing a
value of all zeros will cause a kernel panic in uwb_radio_stop because
wusbhc->uwb_rc has not been set. This patch skips the call to
uwb_radio_stop if wusbhc->uwb_rc has not been initialized.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/wusbcore/mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/wusbcore/mmc.c b/drivers/usb/wusbcore/mmc.c index 44741267c917..3f485df96226 100644 --- a/drivers/usb/wusbcore/mmc.c +++ b/drivers/usb/wusbcore/mmc.c | |||
@@ -301,7 +301,7 @@ int wusbhc_chid_set(struct wusbhc *wusbhc, const struct wusb_ckhdid *chid) | |||
301 | 301 | ||
302 | if (chid) | 302 | if (chid) |
303 | result = uwb_radio_start(&wusbhc->pal); | 303 | result = uwb_radio_start(&wusbhc->pal); |
304 | else | 304 | else if (wusbhc->uwb_rc) |
305 | uwb_radio_stop(&wusbhc->pal); | 305 | uwb_radio_stop(&wusbhc->pal); |
306 | 306 | ||
307 | return result; | 307 | return result; |