]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: da8xx: fix error handling message in probe
authorArnd Bergmann <arnd@arndb.de>
Thu, 22 Sep 2016 20:58:31 +0000 (15:58 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2016 10:26:07 +0000 (12:26 +0200)
commit1b1a87b1bbafbe441fe46b707c001fc32c9c3170
treee278cea842f04d43d0cd8b69110225b9949d93fb
parentd06fc1adf13b14ce7632fe56ffeb966d657a1842
usb: musb: da8xx: fix error handling message in probe

We print an error message when platform_device_register_full()
fails, but the initialization of the argument has been removed,
as shown in this warning:

drivers/usb/musb/da8xx.c: In function 'da8xx_probe':
drivers/usb/musb/da8xx.c:521:3: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This modifies the function to assign the return code before
checking it, and does uses the same method in the check for
usb_phy_generic_register() as well.

Fixes: eddf709f178d ("usb: musb: da8xx: Remove mach code")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/da8xx.c