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

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
8ff242c0 ad6fb736

+8 -8
+8 -8
drivers/usb/host/ohci-nxp.c
··· 169 169 170 170 ret = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); 171 171 if (ret) 172 - goto fail_disable; 172 + goto err_put_client; 173 173 174 174 dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (nxp)\n", hcd_name); 175 175 if (usb_disabled()) { 176 176 dev_err(&pdev->dev, "USB is disabled\n"); 177 177 ret = -ENODEV; 178 - goto fail_disable; 178 + goto err_put_client; 179 179 } 180 180 181 181 /* Enable USB host clock */ ··· 183 183 if (IS_ERR(usb_host_clk)) { 184 184 dev_err(&pdev->dev, "failed to acquire and start USB OHCI clock\n"); 185 185 ret = PTR_ERR(usb_host_clk); 186 - goto fail_disable; 186 + goto err_put_client; 187 187 } 188 188 189 189 isp1301_configure(); ··· 192 192 if (!hcd) { 193 193 dev_err(&pdev->dev, "Failed to allocate HC buffer\n"); 194 194 ret = -ENOMEM; 195 - goto fail_disable; 195 + goto err_put_client; 196 196 } 197 197 198 198 hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); 199 199 if (IS_ERR(hcd->regs)) { 200 200 ret = PTR_ERR(hcd->regs); 201 - goto fail_resource; 201 + goto err_put_hcd; 202 202 } 203 203 hcd->rsrc_start = res->start; 204 204 hcd->rsrc_len = resource_size(res); ··· 206 206 irq = platform_get_irq(pdev, 0); 207 207 if (irq < 0) { 208 208 ret = -ENXIO; 209 - goto fail_resource; 209 + goto err_put_hcd; 210 210 } 211 211 212 212 ohci_nxp_start_hc(); ··· 220 220 } 221 221 222 222 ohci_nxp_stop_hc(); 223 - fail_resource: 223 + err_put_hcd: 224 224 usb_put_hcd(hcd); 225 - fail_disable: 225 + err_put_client: 226 226 put_device(&isp1301_i2c_client->dev); 227 227 isp1301_i2c_client = NULL; 228 228 return ret;