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>
This commit is contained in:
Wei Yongjun 2016-09-12 21:48:35 -05:00 коммит произвёл Greg Kroah-Hartman
Родитель 947c49afe4
Коммит 48fed03b4b
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -510,8 +510,10 @@ static int am35x_probe(struct platform_device *pdev)
pdata->platform_ops = &am35x_ops;
glue->phy = usb_phy_generic_register();
if (IS_ERR(glue->phy))
if (IS_ERR(glue->phy)) {
ret = PTR_ERR(glue->phy);
goto err7;
}
platform_set_drvdata(pdev, glue);
pinfo = am35x_dev_info;