Commit 34884c4f authored by Wei Yongjun's avatar Wei Yongjun Committed by Ulf Hansson

mmc: sdhci-of-dwcmshc: fix error return code in dwcmshc_probe()

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

Fixes: c2c4da37837e ("mmc: sdhci-of-dwcmshc: add rockchip platform support")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210323112956.1016884-1-weiyongjun1@huawei.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent eb81ed51
......@@ -404,8 +404,10 @@ static int dwcmshc_probe(struct platform_device *pdev)
if (pltfm_data == &sdhci_dwcmshc_rk3568_pdata) {
rk_priv = devm_kzalloc(&pdev->dev, sizeof(struct rk3568_priv), GFP_KERNEL);
if (!rk_priv)
if (!rk_priv) {
err = -ENOMEM;
goto err_clk;
}
priv->priv = rk_priv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment