Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: musb: am35x: fix error return code in am35x_probe()

Fix to return a negative error code from the usb_phy_generic_register()
error handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wei Yongjun and committed by
Greg Kroah-Hartman
48fed03b 947c49af

+3 -1
+3 -1
drivers/usb/musb/am35x.c
··· 510 510 pdata->platform_ops = &am35x_ops; 511 511 512 512 glue->phy = usb_phy_generic_register(); 513 - if (IS_ERR(glue->phy)) 513 + if (IS_ERR(glue->phy)) { 514 + ret = PTR_ERR(glue->phy); 514 515 goto err7; 516 + } 515 517 platform_set_drvdata(pdev, glue); 516 518 517 519 pinfo = am35x_dev_info;