提交 295208a6 编写于 作者: K Krzysztof Kozlowski 提交者: Ulf Hansson

mmc: jz4740: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and the error value gets printed.
Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200902193658.20539-5-krzk@kernel.orgReviewed-by: NPaul Cercueil <paul@crapouillou.net>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 380a99a2
......@@ -991,9 +991,7 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
ret = mmc_of_parse(mmc);
if (ret) {
if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"could not parse device properties: %d\n", ret);
dev_err_probe(&pdev->dev, ret, "could not parse device properties\n");
goto err_free_host;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册