usb: gadget: u_ether: fix dereference after null check coverify warning
authorPeter Chen <peter.chen@nxp.com>
Fri, 1 Jul 2016 07:33:29 +0000 (15:33 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 11 Aug 2016 12:09:44 +0000 (15:09 +0300)
commit88c09eacf560c3303d0ee8cf91b8b7ff7f000350
tree6d4a5211694e9dca955d25ab390fb26acb543d34
parentc526c62d565ea5a5bba9433f28756079734f430d
usb: gadget: u_ether: fix dereference after null check coverify warning

dev->port_usb is checked for null pointer at above code, so dev->port_usb
might be null, fix it by adding null pointer check.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/u_ether.c