Skip to contentSkip to conversation

mmc: dw-mmc: fix the return value for exynos's setup_clock()

PATCH In review Jaehoon Chung 1 participant 1 message Feb 18, 2013

Subsystems (3)
lore
Share & tools
lore

Jaehoon Chung

author maintainer
#0 lore raw

PATCH 2/2 mmc: dw-mmc: fix the return value for exynos's setup_clock()

Before adjusting this patch, always return 0. Then clock-setup would be always succeed.
In dw-mmc.c, it's checked like below

ret = drv_data->setup_clock(host);

if (ret) {
	...
	Never entered at here..
}
---
 drivers/mmc/host/dw_mmc-exynos.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/dw_mmc-exynos.c +1 -1
index 72fd0f2..764ff29 100644
@@ -99,7 +99,7 @@ static int dw_mci_exynos_setup_clock(struct dw_mci *host)
 	else if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS4210)
 		host->bus_hz /= EXYNOS4210_FIXED_CIU_CLK_DIV;
 
-	return 0;
+	return host->bus_hz ? 0 : -EINVAL;
 }
 
 static void dw_mci_exynos_prepare_command(struct dw_mci *host, u32 *cmdr)
Signature · 1 line
1.7.9.5