usb: gadget: udc: add null check before pointer dereference
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Tue, 2 May 2017 16:37:22 +0000 (11:37 -0500)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 17 May 2017 11:16:20 +0000 (14:16 +0300)
commit53e720f332d546dee5a98a55f6e532355727bc4d
treed974433230af4267f9f071320e08653249ab64b2
parentd94e64cb24790b1df52524173330020ff950921d
usb: gadget: udc: add null check before pointer dereference

Add null check before dereferencing dev->regs pointer inside
net2280_led_shutdown() function.

Addresses-Coverity-ID: 101783
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/net2280.c