Message ID | 0769d30c-ad80-421b-bf5d-7d6f5d85604e@moroto.mountain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mmc: vub300: fix an error code | expand |
On Thu, 2 Nov 2023 at 08:51, Dan Carpenter <dan.carpenter@linaro.org> wrote: > > This error path should return -EINVAL instead of success. > > Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver") > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Applied for fixes and by adding a stable tag, thanks! Kind regards Uffe > --- > drivers/mmc/host/vub300.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c > index de3f443f5fdc..fd67c0682b38 100644 > --- a/drivers/mmc/host/vub300.c > +++ b/drivers/mmc/host/vub300.c > @@ -2309,6 +2309,7 @@ static int vub300_probe(struct usb_interface *interface, > vub300->read_only = > (0x0010 & vub300->system_port_status.port_flags) ? 1 : 0; > } else { > + retval = -EINVAL; > goto error5; > } > usb_set_intfdata(interface, vub300); > -- > 2.42.0 >
diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c index de3f443f5fdc..fd67c0682b38 100644 --- a/drivers/mmc/host/vub300.c +++ b/drivers/mmc/host/vub300.c @@ -2309,6 +2309,7 @@ static int vub300_probe(struct usb_interface *interface, vub300->read_only = (0x0010 & vub300->system_port_status.port_flags) ? 1 : 0; } else { + retval = -EINVAL; goto error5; } usb_set_intfdata(interface, vub300);
This error path should return -EINVAL instead of success. Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> --- drivers/mmc/host/vub300.c | 1 + 1 file changed, 1 insertion(+)