Skip to content

Commit 44f2047

Browse files
Dan CarpenterKexyBiscuit
authored andcommitted
UPSTREAM: 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 <[email protected]> Reviewed-by: Binbin Zhou <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]> (cherry picked from commit 553d382) Signed-off-by: Kexy Biscuit <[email protected]>
1 parent b0ad10f commit 44f2047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)