diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-09-02 17:06:39 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2021-06-23 18:23:55 +0200 |
commit | cc883cdf68f5e4d437450e1696953c6bbdff6c6b (patch) | |
tree | 3f54eb30bf82a2849f026c01534a26c99e567f51 | |
parent | 2d1a83a4f36f1a6fd8c510db409772e34bf4eed1 (diff) |
i2c: 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>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
-rw-r--r-- | drivers/i2c/busses/i2c-davinci.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 232a7679b69b..e9d07323c604 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -768,10 +768,7 @@ static int davinci_i2c_probe(struct platform_device *pdev) if (irq <= 0) { if (!irq) irq = -ENXIO; - if (irq != -EPROBE_DEFER) - dev_err(&pdev->dev, - "can't get irq resource ret=%d\n", irq); - return irq; + return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n"); } dev = devm_kzalloc(&pdev->dev, sizeof(struct davinci_i2c_dev), |