diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2020-09-02 19:46:14 +0200 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-09-13 17:38:37 +0100 |
commit | ea6c25e6057c0b7c18337696be84b8f9751f19ec (patch) | |
tree | 2043fb055b101e2ba042b1556783b2dcedac5546 /drivers/irqchip/irq-ti-sci-intr.c | |
parent | f4d51dffc6c01a9e94650d95ce0104964f8ae822 (diff) | |
download | linux-stable-ea6c25e6057c0b7c18337696be84b8f9751f19ec.tar.gz linux-stable-ea6c25e6057c0b7c18337696be84b8f9751f19ec.tar.bz2 linux-stable-ea6c25e6057c0b7c18337696be84b8f9751f19ec.zip |
irqchip/ti-sci: 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.
There is also no need to assign NULL to 'intr->sci' as it is part of
devm-allocated memory.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200902174615.24695-1-krzk@kernel.org
Diffstat (limited to 'drivers/irqchip/irq-ti-sci-intr.c')
-rw-r--r-- | drivers/irqchip/irq-ti-sci-intr.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/irqchip/irq-ti-sci-intr.c b/drivers/irqchip/irq-ti-sci-intr.c index cbc1758228d9..6a6fb6616c21 100644 --- a/drivers/irqchip/irq-ti-sci-intr.c +++ b/drivers/irqchip/irq-ti-sci-intr.c @@ -254,13 +254,9 @@ static int ti_sci_intr_irq_domain_probe(struct platform_device *pdev) } intr->sci = devm_ti_sci_get_by_phandle(dev, "ti,sci"); - if (IS_ERR(intr->sci)) { - ret = PTR_ERR(intr->sci); - if (ret != -EPROBE_DEFER) - dev_err(dev, "ti,sci read fail %d\n", ret); - intr->sci = NULL; - return ret; - } + if (IS_ERR(intr->sci)) + return dev_err_probe(dev, PTR_ERR(intr->sci), + "ti,sci read fail\n"); ret = of_property_read_u32(dev_of_node(dev), "ti,sci-dev-id", &intr->ti_sci_id); |