mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 07:39:47 +00:00
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>
This commit is contained in:
parent
7584f2ebc1
commit
bd130adaca
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user