Skip to content

Commit 8ff242c

Browse files
jhovoldgregkh
authored andcommitted
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>
1 parent ad6fb73 commit 8ff242c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

drivers/usb/host/ohci-nxp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,21 +169,21 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
169169

170170
ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
171171
if (ret)
172-
goto fail_disable;
172+
goto err_put_client;
173173

174174
dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (nxp)\n", hcd_name);
175175
if (usb_disabled()) {
176176
dev_err(&pdev->dev, "USB is disabled\n");
177177
ret = -ENODEV;
178-
goto fail_disable;
178+
goto err_put_client;
179179
}
180180

181181
/* Enable USB host clock */
182182
usb_host_clk = devm_clk_get_enabled(&pdev->dev, NULL);
183183
if (IS_ERR(usb_host_clk)) {
184184
dev_err(&pdev->dev, "failed to acquire and start USB OHCI clock\n");
185185
ret = PTR_ERR(usb_host_clk);
186-
goto fail_disable;
186+
goto err_put_client;
187187
}
188188

189189
isp1301_configure();
@@ -192,21 +192,21 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
192192
if (!hcd) {
193193
dev_err(&pdev->dev, "Failed to allocate HC buffer\n");
194194
ret = -ENOMEM;
195-
goto fail_disable;
195+
goto err_put_client;
196196
}
197197

198198
hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
199199
if (IS_ERR(hcd->regs)) {
200200
ret = PTR_ERR(hcd->regs);
201-
goto fail_resource;
201+
goto err_put_hcd;
202202
}
203203
hcd->rsrc_start = res->start;
204204
hcd->rsrc_len = resource_size(res);
205205

206206
irq = platform_get_irq(pdev, 0);
207207
if (irq < 0) {
208208
ret = -ENXIO;
209-
goto fail_resource;
209+
goto err_put_hcd;
210210
}
211211

212212
ohci_nxp_start_hc();
@@ -220,9 +220,9 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
220220
}
221221

222222
ohci_nxp_stop_hc();
223-
fail_resource:
223+
err_put_hcd:
224224
usb_put_hcd(hcd);
225-
fail_disable:
225+
err_put_client:
226226
put_device(&isp1301_i2c_client->dev);
227227
isp1301_i2c_client = NULL;
228228
return ret;

0 commit comments

Comments
 (0)