mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-11 12:30:09 +00:00
mmc: mtk-sd: fix devm_clk_get_optional usage
This already returns NULL when not found. However, it can return EPROBE_DEFER and should thus return here. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://lore.kernel.org/r/20240930224919.355359-4-rosenp@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
@@ -2794,9 +2794,8 @@ static int msdc_drv_probe(struct platform_device *pdev)
|
|||||||
if (!(mmc->caps2 & MMC_CAP2_NO_MMC)) {
|
if (!(mmc->caps2 & MMC_CAP2_NO_MMC)) {
|
||||||
host->crypto_clk = devm_clk_get_optional(&pdev->dev, "crypto");
|
host->crypto_clk = devm_clk_get_optional(&pdev->dev, "crypto");
|
||||||
if (IS_ERR(host->crypto_clk))
|
if (IS_ERR(host->crypto_clk))
|
||||||
host->crypto_clk = NULL;
|
return PTR_ERR(host->crypto_clk);
|
||||||
else
|
mmc->caps2 |= MMC_CAP2_CRYPTO;
|
||||||
mmc->caps2 |= MMC_CAP2_CRYPTO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
host->irq = platform_get_irq(pdev, 0);
|
host->irq = platform_get_irq(pdev, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user