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

cdev->config is checked for null pointer at above code, so cdev->config
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/composite.c