OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:23:18 +0000 (06:23 +0200)
commit36be44e1905d593402d373aa35b48ceec9ae46f0
treea848b5ca73bfb909419e165f55de0a1fa5464297
parentc0f71babf7bbfeba850abeba2b56545a7eaf8a75
usb: gadget: composite: fix dereference after null check coverify warning

commit c526c62d565ea5a5bba9433f28756079734f430d upstream.

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>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/composite.c