There is a cut and paste bug so we accidentally return the wrong
variable. It should be "ret" instead of PTR_ERR(host->clk).
Fixes: 2115772014bd ("mmc: loongson2: Add Loongson-2K SD/SDIO controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/847bf395-6d62-49c9-a39d-8e82c5b17bf7@sabinyo.mountain
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
if (host->clk) {
ret = devm_clk_rate_exclusive_get(dev, host->clk);
if (ret)
- return PTR_ERR(host->clk);
+ return ret;
host->current_clk = clk_get_rate(host->clk);
} else {