diff options
author | Gustavo A. R. Silva <garsilva@embeddedor.com> | 2017-06-30 01:14:45 -0500 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-08-10 14:48:18 +0200 |
commit | 5c23a558a65406cac472df07fd26a2688a42cad2 (patch) | |
tree | 3aff0312715a45df9b8d7f904beff276cf1fb7cd /drivers/clocksource | |
parent | d197f7988721221fac64f899efd7657c15281810 (diff) | |
download | op-kernel-dev-5c23a558a65406cac472df07fd26a2688a42cad2.zip op-kernel-dev-5c23a558a65406cac472df07fd26a2688a42cad2.tar.gz |
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>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/em_sti.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c index bc48cbf..269db74 100644 --- a/drivers/clocksource/em_sti.c +++ b/drivers/clocksource/em_sti.c @@ -305,7 +305,7 @@ static int em_sti_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "failed to get irq\n"); - return -EINVAL; + return irq; } /* 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)) return PTR_ERR(p->base); - if (devm_request_irq(&pdev->dev, irq, em_sti_interrupt, - IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING, - dev_name(&pdev->dev), p)) { + ret = devm_request_irq(&pdev->dev, irq, em_sti_interrupt, + IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING, + dev_name(&pdev->dev), p); + if (ret) { dev_err(&pdev->dev, "failed to request low IRQ\n"); - return -ENOENT; + return ret; } /* get hold of clock */ |