usb: gadget: fsl: Fix registering from chipidea driver
The fsl gadget driver wants to configure the portsc register
with information from platform_data. When registered from the
chipidea driver there is no platform_data. Fix the resulting
crash by not derefencing platform_data when NULL. In this
case the PORTSC register is not touched, it will have been
configured by the chipidea driver in this case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent acb28bb commit c6edbecd68750e1752550f4f9255dafc1ab57370
@Sascha Hauer Sascha Hauer authored on 18 Jun 2013
Showing 1 changed file
View
drivers/usb/gadget/fsl_udc.c