OSDN Git Service

xhci: check control context is valid before dereferencing it.
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 6 Apr 2021 07:02:06 +0000 (10:02 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Apr 2021 09:16:55 +0000 (11:16 +0200)
commit597899d2f7c5619c87185ee7953d004bd37fd0eb
tree119be0f1b485d302c7bf866d37f7979508c65a48
parent8a157d2ff104d2849c58226a1fd02365d7d60150
xhci: check control context is valid before dereferencing it.

Don't dereference ctrl_ctx before checking it's valid.
Issue reported by Klockwork

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210406070208.3406266-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c