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)
commit984f3be5910c640bbff469bb3d4679036fce6395
treee278cea842f04d43d0cd8b69110225b9949d93fb
parent2b9a8c40836930a45f42f06f98731eb9614ba86b
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: 947c49afe41f ("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