Skip to content

Commit 553d382

Browse files
Dan CarpenterUlf Hansson
authored andcommitted
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: 2115772 ("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>
1 parent 4ad9e44 commit 553d382

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mmc/host/loongson2-mmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ static int loongson2_mmc_resource_request(struct platform_device *pdev,
887887
if (host->clk) {
888888
ret = devm_clk_rate_exclusive_get(dev, host->clk);
889889
if (ret)
890-
return PTR_ERR(host->clk);
890+
return ret;
891891

892892
host->current_clk = clk_get_rate(host->clk);
893893
} else {

0 commit comments

Comments
 (0)