Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: loongson2: Fix error code in loongson2_mmc_resource_request()

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>

authored by

Dan Carpenter and committed by
Ulf Hansson
553d3823 4ad9e44c

+1 -1
+1 -1
drivers/mmc/host/loongson2-mmc.c
··· 887 887 if (host->clk) { 888 888 ret = devm_clk_rate_exclusive_get(dev, host->clk); 889 889 if (ret) 890 - return PTR_ERR(host->clk); 890 + return ret; 891 891 892 892 host->current_clk = clk_get_rate(host->clk); 893 893 } else {