diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-08-28 17:26:35 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-09-03 12:38:59 +0530 |
commit | af53bef5636d92e81279f4a16f814f8dccf9bf89 (patch) | |
tree | 9ede3f9fcd8ef5251bce391cf7db5abbde56b1ce /drivers/dma/pl330.c | |
parent | 5d7e816e444569c9fdd901ecf0e3933a6ed9a501 (diff) |
dmaengine: pl330: 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/20200828152637.16903-1-krzk@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r-- | drivers/dma/pl330.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 591867e976a4..f3e67765c66c 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -3038,9 +3038,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) pl330->rstc = devm_reset_control_get_optional(&adev->dev, "dma"); if (IS_ERR(pl330->rstc)) { - if (PTR_ERR(pl330->rstc) != -EPROBE_DEFER) - dev_err(&adev->dev, "Failed to get reset!\n"); - return PTR_ERR(pl330->rstc); + return dev_err_probe(&adev->dev, PTR_ERR(pl330->rstc), "Failed to get reset!\n"); } else { ret = reset_control_deassert(pl330->rstc); if (ret) { @@ -3051,9 +3049,8 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) pl330->rstc_ocp = devm_reset_control_get_optional(&adev->dev, "dma-ocp"); if (IS_ERR(pl330->rstc_ocp)) { - if (PTR_ERR(pl330->rstc_ocp) != -EPROBE_DEFER) - dev_err(&adev->dev, "Failed to get OCP reset!\n"); - return PTR_ERR(pl330->rstc_ocp); + return dev_err_probe(&adev->dev, PTR_ERR(pl330->rstc_ocp), + "Failed to get OCP reset!\n"); } else { ret = reset_control_deassert(pl330->rstc_ocp); if (ret) { |