mmc: davinci: 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: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200902193658.20539-3-krzk@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Krzysztof Kozlowski 2020-09-02 21:36:49 +02:00 committed by Ulf Hansson
parent aec429e09e
commit 3a35e7e1bd
1 changed files with 2 additions and 3 deletions

View File

@ -1240,9 +1240,8 @@ static int davinci_mmcsd_probe(struct platform_device *pdev)
pdev->id_entry = match->data; pdev->id_entry = match->data;
ret = mmc_of_parse(mmc); ret = mmc_of_parse(mmc);
if (ret) { if (ret) {
if (ret != -EPROBE_DEFER) dev_err_probe(&pdev->dev, ret,
dev_err(&pdev->dev, "could not parse of data\n");
"could not parse of data: %d\n", ret);
goto parse_fail; goto parse_fail;
} }
} else { } else {