From: Thomas Pugliese Date: Wed, 23 Apr 2014 19:28:10 +0000 (-0500) Subject: usb: wusbcore: fix panic in wusbhc_chid_set X-Git-Tag: Ubuntu-5.2.0-15.16~13566^2~16 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bd130adacaf8cea179f9a700fb694f5be3b05bf0;p=mirror_ubuntu-eoan-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- 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) if (chid) result = uwb_radio_start(&wusbhc->pal); - else + else if (wusbhc->uwb_rc) uwb_radio_stop(&wusbhc->pal); return result;