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

mmc: vub300: fix an error code

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>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/0769d30c-ad80-421b-bf5d-7d6f5d85604e@moroto.mountain
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Dan Carpenter and committed by
Ulf Hansson
b44f9da8 ed9009ad

+1
+1
drivers/mmc/host/vub300.c
··· 2309 2309 vub300->read_only = 2310 2310 (0x0010 & vub300->system_port_status.port_flags) ? 1 : 0; 2311 2311 } else { 2312 + retval = -EINVAL; 2312 2313 goto error5; 2313 2314 } 2314 2315 usb_set_intfdata(interface, vub300);