mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
usb: ohci-nxp: clean up probe error labels
Error labels should be named after what they do rather than after from where they are jumped to. Rename the probe error labels for consistency and to improve readability. Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Vladimir Zapolskiy <vz@mleia.com> Link: https://patch.msgid.link/20251218153519.19453-6-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ad6fb7367e
commit
8ff242c041
@ -169,13 +169,13 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
|
||||
|
||||
ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (ret)
|
||||
goto fail_disable;
|
||||
goto err_put_client;
|
||||
|
||||
dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (nxp)\n", hcd_name);
|
||||
if (usb_disabled()) {
|
||||
dev_err(&pdev->dev, "USB is disabled\n");
|
||||
ret = -ENODEV;
|
||||
goto fail_disable;
|
||||
goto err_put_client;
|
||||
}
|
||||
|
||||
/* Enable USB host clock */
|
||||
@ -183,7 +183,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(usb_host_clk)) {
|
||||
dev_err(&pdev->dev, "failed to acquire and start USB OHCI clock\n");
|
||||
ret = PTR_ERR(usb_host_clk);
|
||||
goto fail_disable;
|
||||
goto err_put_client;
|
||||
}
|
||||
|
||||
isp1301_configure();
|
||||
@ -192,13 +192,13 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
|
||||
if (!hcd) {
|
||||
dev_err(&pdev->dev, "Failed to allocate HC buffer\n");
|
||||
ret = -ENOMEM;
|
||||
goto fail_disable;
|
||||
goto err_put_client;
|
||||
}
|
||||
|
||||
hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
||||
if (IS_ERR(hcd->regs)) {
|
||||
ret = PTR_ERR(hcd->regs);
|
||||
goto fail_resource;
|
||||
goto err_put_hcd;
|
||||
}
|
||||
hcd->rsrc_start = res->start;
|
||||
hcd->rsrc_len = resource_size(res);
|
||||
@ -206,7 +206,7 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
ret = -ENXIO;
|
||||
goto fail_resource;
|
||||
goto err_put_hcd;
|
||||
}
|
||||
|
||||
ohci_nxp_start_hc();
|
||||
@ -220,9 +220,9 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
ohci_nxp_stop_hc();
|
||||
fail_resource:
|
||||
err_put_hcd:
|
||||
usb_put_hcd(hcd);
|
||||
fail_disable:
|
||||
err_put_client:
|
||||
put_device(&isp1301_i2c_client->dev);
|
||||
isp1301_i2c_client = NULL;
|
||||
return ret;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user