Skip to content

Commit

Permalink
irqchip/ti-sci-inta: Fix return value about devm_ioremap_resource()
Browse files Browse the repository at this point in the history
When call function devm_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.

Fixes: 9f1463b ("irqchip/ti-sci-inta: Add support for Interrupt Aggregator driver")
Signed-off-by: Tiezhu Yang <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Reviewed-by: Grygorii Strashko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
seehearfeel authored and Marc Zyngier committed Jun 27, 2020
1 parent 3d21f0b commit 4b127a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/irqchip/irq-ti-sci-inta.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ static int ti_sci_inta_irq_domain_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
inta->base = devm_ioremap_resource(dev, res);
if (IS_ERR(inta->base))
return -ENODEV;
return PTR_ERR(inta->base);

domain = irq_domain_add_linear(dev_of_node(dev),
ti_sci_get_num_resources(inta->vint),
Expand Down

0 comments on commit 4b127a1

Please sign in to comment.