These error paths return success but they need to return a negative
error code.
Fixes:
7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YrVmLEc/FOEzNdzj@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
glue->clk = clk;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata)
+ if (!pdata) {
+ ret = -ENOMEM;
goto err_clk_disable;
+ }
pdata->config = &mpfs_musb_hdrc_config;
pdata->platform_ops = &mpfs_ops;
if (IS_ERR(glue->phy)) {
dev_err(dev, "failed to register usb-phy %ld\n",
PTR_ERR(glue->phy));
+ ret = PTR_ERR(glue->phy);
goto err_clk_disable;
}