clocksource/drivers/em_sti: Fix error return codes in em_sti_probe()
Propagate the return values of platform_get_irq and devm_request_irq on failure. Cc: Frans Klaver <fransklaver@gmail.com> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
This commit is contained in:
parent
d197f79887
commit
5c23a558a6
|
@ -305,7 +305,7 @@ static int em_sti_probe(struct platform_device *pdev)
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0) {
|
if (irq < 0) {
|
||||||
dev_err(&pdev->dev, "failed to get irq\n");
|
dev_err(&pdev->dev, "failed to get irq\n");
|
||||||
return -EINVAL;
|
return irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* map memory, let base point to the STI instance */
|
/* map memory, let base point to the STI instance */
|
||||||
|
@ -314,11 +314,12 @@ static int em_sti_probe(struct platform_device *pdev)
|
||||||
if (IS_ERR(p->base))
|
if (IS_ERR(p->base))
|
||||||
return PTR_ERR(p->base);
|
return PTR_ERR(p->base);
|
||||||
|
|
||||||
if (devm_request_irq(&pdev->dev, irq, em_sti_interrupt,
|
ret = devm_request_irq(&pdev->dev, irq, em_sti_interrupt,
|
||||||
IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
|
IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
|
||||||
dev_name(&pdev->dev), p)) {
|
dev_name(&pdev->dev), p);
|
||||||
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "failed to request low IRQ\n");
|
dev_err(&pdev->dev, "failed to request low IRQ\n");
|
||||||
return -ENOENT;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get hold of clock */
|
/* get hold of clock */
|
||||||
|
|
Loading…
Reference in New Issue