Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thomas Pugliese and committed by
Greg Kroah-Hartman
bd130ada 7584f2eb

+1 -1
+1 -1
drivers/usb/wusbcore/mmc.c
··· 301 301 302 302 if (chid) 303 303 result = uwb_radio_start(&wusbhc->pal); 304 - else 304 + else if (wusbhc->uwb_rc) 305 305 uwb_radio_stop(&wusbhc->pal); 306 306 307 307 return result;