linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Mark Brown <broonie@kernel.org>, "Sanjay R Mehta" <sanju.mehta@amd.com>
Cc: linux-spi@vger.kernel.org
Subject: [PATCH 2/5] spi: amd: Pass probe errors back to driver core
Date: Mon, 4 May 2020 13:12:02 +0200	[thread overview]
Message-ID: <689f29a359718dab4f5de9ee66c02ea97b3bd9e8.1588590210.git.lukas@wunner.de> (raw)
In-Reply-To: <cover.1588590210.git.lukas@wunner.de>

If probing fails, the AMD SPI driver pretends success to the driver core
by returning 0.  Return the errno instead.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
---
 drivers/spi/spi-amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c
index 65b53eee5be9..a4248b97b67e 100644
--- a/drivers/spi/spi-amd.c
+++ b/drivers/spi/spi-amd.c
@@ -294,7 +294,7 @@ static int amd_spi_probe(struct platform_device *pdev)
 err_free_master:
 	spi_master_put(master);
 
-	return 0;
+	return err;
 }
 
 static int amd_spi_remove(struct platform_device *pdev)
-- 
2.26.2


  parent reply	other threads:[~2020-05-04 11:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 11:12 [PATCH 0/5] Grab bag with AMD SPI fixes Lukas Wunner
2020-05-04 11:12 ` [PATCH 1/5] spi: amd: Fix duplicate iounmap in error path Lukas Wunner
2020-05-04 11:12 ` Lukas Wunner [this message]
2020-05-04 11:12 ` [PATCH 3/5] spi: amd: Drop duplicate driver data assignments Lukas Wunner
2020-05-04 11:12 ` [PATCH 4/5] spi: amd: Fix refcount underflow on remove Lukas Wunner
2020-05-04 11:12 ` [PATCH 5/5] spi: amd: Drop superfluous member from struct amd_spi Lukas Wunner
2020-05-05 12:17 ` [PATCH 0/5] Grab bag with AMD SPI fixes Mark Brown

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=689f29a359718dab4f5de9ee66c02ea97b3bd9e8.1588590210.git.lukas@wunner.de \
    --to=lukas@wunner.de \
    --cc=broonie@kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=sanju.mehta@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).