Skip to content

Commit

Permalink
mmc: usdhi6rol0: fix error return code in usdhi6_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit 2f9ae69 ]

Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.

Fixes: 75fa9ea ("mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210508020321.1677-1-thunder.leizhen@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zhen Lei authored and gregkh committed Jul 14, 2021
1 parent c10cf8d commit 92345b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mmc/host/usdhi6rol0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,7 @@ static int usdhi6_probe(struct platform_device *pdev)

version = usdhi6_read(host, USDHI6_VERSION);
if ((version & 0xfff) != 0xa0d) {
ret = -EPERM;
dev_err(dev, "Version not recognized %x\n", version);
goto e_clk_off;
}
Expand Down

0 comments on commit 92345b3

Please sign in to comment.