Skip to content

Commit 5b8b35d

Browse files
jhovoldUlf Hansson
authored andcommitted
mmc: vub300: rename probe error labels
Error labels should be named after what they do. Rename the probe error labels. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent fe0179f commit 5b8b35d

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

drivers/mmc/host/vub300.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,19 +2107,19 @@ static int vub300_probe(struct usb_interface *interface,
21072107
command_out_urb = usb_alloc_urb(0, GFP_KERNEL);
21082108
if (!command_out_urb) {
21092109
retval = -ENOMEM;
2110-
goto error0;
2110+
goto err_put_udev;
21112111
}
21122112
command_res_urb = usb_alloc_urb(0, GFP_KERNEL);
21132113
if (!command_res_urb) {
21142114
retval = -ENOMEM;
2115-
goto error1;
2115+
goto err_free_out_urb;
21162116
}
21172117
/* this also allocates memory for our VUB300 mmc host device */
21182118
mmc = mmc_alloc_host(sizeof(*vub300), &udev->dev);
21192119
if (!mmc) {
21202120
retval = -ENOMEM;
21212121
dev_err(&udev->dev, "not enough memory for the mmc_host\n");
2122-
goto error4;
2122+
goto err_free_res_urb;
21232123
}
21242124
/* MMC core transfer sizes tunable parameters */
21252125
mmc->caps = 0;
@@ -2336,23 +2336,25 @@ static int vub300_probe(struct usb_interface *interface,
23362336
interface_to_InterfaceNumber(interface));
23372337
retval = mmc_add_host(mmc);
23382338
if (retval)
2339-
goto error6;
2339+
goto err_delete_timer;
23402340

23412341
return 0;
2342-
error6:
2342+
2343+
err_delete_timer:
23432344
timer_delete_sync(&vub300->inactivity_timer);
23442345
err_free_host:
23452346
mmc_free_host(mmc);
23462347
/*
23472348
* and hence also frees vub300
23482349
* which is contained at the end of struct mmc
23492350
*/
2350-
error4:
2351+
err_free_res_urb:
23512352
usb_free_urb(command_res_urb);
2352-
error1:
2353+
err_free_out_urb:
23532354
usb_free_urb(command_out_urb);
2354-
error0:
2355+
err_put_udev:
23552356
usb_put_dev(udev);
2357+
23562358
return retval;
23572359
}
23582360

0 commit comments

Comments
 (0)