From: Kishon Vijay Abraham I Date: Thu, 11 Jun 2015 16:42:11 +0000 (+0530) Subject: usb: gadget: composite: Fix NULL pointer dereference X-Git-Tag: omap-for-v4.3/fixes-merge-window~230^2~1^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4c21f0bdd2c0cd5d5be1bb56f0a28dae5041eed;p=pandora-kernel.git usb: gadget: composite: Fix NULL pointer dereference commit f563d230903210acc ("usb: gadget: composite: add req_match method to usb_function") accesses cdev->config even before set config is invoked causing a NULL pointer dereferencing error while running Lecroy Mass Storage Compliance test. Fix it here by accessing cdev->config only if it is non NULL. Fixes: commit f563d230903210acc ("usb: gadget: composite: add req_match method to usb_function"). Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed