All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Tony Olech <tony.olech@elandigitalsystems.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Deren Wu <deren.wu@mediatek.com>, Bo Liu <liubo03@inspur.com>,
	Justin Stitt <justinstitt@google.com>,
	Yang Yingliang <yangyingliang@huawei.com>,
	Chris Ball <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] mmc: vub300: fix an error code
Date: Thu, 2 Nov 2023 10:51:06 +0300	[thread overview]
Message-ID: <0769d30c-ad80-421b-bf5d-7d6f5d85604e@moroto.mountain> (raw)

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(+)

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


             reply	other threads:[~2023-11-02  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02  7:51 Dan Carpenter [this message]
2023-11-03 11:16 ` [PATCH] mmc: vub300: fix an error code Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0769d30c-ad80-421b-bf5d-7d6f5d85604e@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=cjb@laptop.org \
    --cc=deren.wu@mediatek.com \
    --cc=justinstitt@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=liubo03@inspur.com \
    --cc=tony.olech@elandigitalsystems.com \
    --cc=ulf.hansson@linaro.org \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.