]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc2: avoid NULL dereferences
authorJohn Keeping <john@metanate.com>
Sun, 15 Jul 2018 14:50:43 +0000 (15:50 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 17 Jul 2018 07:12:51 +0000 (10:12 +0300)
commit6755117b7add5f50c64cb09480efe4c454fcea98
tree5bacc1243d6da86ca5b06342e201daa41cc7020d
parentaf2c07733b55464e341f739126b7f9d1557a2830
usb: dwc2: avoid NULL dereferences

For unidirectional endpoints, the endpoint pointer will be NULL for the
unused direction.  Check that the endpoint is active before
dereferencing this pointer.

Fixes: 8f67ecbce135 ("usb: dwc2: Update dwc2_handle_incomplete_isoc_in() function")
Fixes: 7826ec3a8e06 ("usb: dwc2: Update dwc2_handle_incomplete_isoc_out() function")
Fixes: 298a7fe5516c ("usb: dwc2: Update GINTSTS_GOUTNAKEFF interrupt handling")
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c