mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +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:
parent
88ef1c6371
commit
ed299eda8f
@ -2794,9 +2794,8 @@ static int msdc_drv_probe(struct platform_device *pdev)
|
||||
if (!(mmc->caps2 & MMC_CAP2_NO_MMC)) {
|
||||
host->crypto_clk = devm_clk_get_optional(&pdev->dev, "crypto");
|
||||
if (IS_ERR(host->crypto_clk))
|
||||
host->crypto_clk = NULL;
|
||||
else
|
||||
mmc->caps2 |= MMC_CAP2_CRYPTO;
|
||||
return PTR_ERR(host->crypto_clk);
|
||||
mmc->caps2 |= MMC_CAP2_CRYPTO;
|
||||
}
|
||||
|
||||
host->irq = platform_get_irq(pdev, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user