linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: meson-mx-sdio: return correct error code
@ 2017-10-13 11:19 Dan Carpenter
  2017-10-13 11:20 ` [PATCH 2/2] mmc: meson-mx-sdio: Cleanup IS_ERR() checks Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-10-13 11:19 UTC (permalink / raw)
  To: Ulf Hansson, Carlo Caione
  Cc: Carlo Caione, Kevin Hilman, linux-mmc, linux-amlogic,
	kernel-janitors

This has a copy and paste bug so we use "host->fixed_factor_clk" which
is a valid pointer instead of "host->cfg_div_clk" which holds the error
code.

Fixes: 0aa0fb9cd239 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
index 19b499bbe691..dc30ed5e964b 100644
--- a/drivers/mmc/host/meson-mx-sdio.c
+++ b/drivers/mmc/host/meson-mx-sdio.c
@@ -621,7 +621,7 @@ static int meson_mx_mmc_register_clks(struct meson_mx_mmc_host *host)
 	host->cfg_div_clk = devm_clk_register(host->controller_dev,
 					      &host->cfg_div.hw);
 	if (WARN_ON(PTR_ERR_OR_ZERO(host->cfg_div_clk)))
-		return PTR_ERR(host->fixed_factor_clk);
+		return PTR_ERR(host->cfg_div_clk);
 
 	return 0;
 }

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-20 10:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-13 11:19 [PATCH 1/2] mmc: meson-mx-sdio: return correct error code Dan Carpenter
2017-10-13 11:20 ` [PATCH 2/2] mmc: meson-mx-sdio: Cleanup IS_ERR() checks Dan Carpenter
2017-10-13 19:02   ` Martin Blumenstingl
2017-10-20 10:02   ` Ulf Hansson
2017-10-13 18:58 ` [PATCH 1/2] mmc: meson-mx-sdio: return correct error code Martin Blumenstingl
2017-10-20 10:02 ` Ulf Hansson

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).