summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-10-07 14:13:10 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2015-10-07 14:13:10 +0100
commit07443cecdf68b4cf4c7d8ee0dbe0b2aa94c3e661 (patch)
treebb492a2c36da40c7da393d710fdb3009d7a89560 /drivers
parent21f3c96188f1a1e592174bef3180d147e06f7b89 (diff)
parentc2c80bdb9e91b412ea68f6dcc49c5d7b91e0b930 (diff)
downloadlinux-07443cecdf68b4cf4c7d8ee0dbe0b2aa94c3e661.tar.bz2
Merge tag 'spi-fix-v4.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown: "A couple of very minor fixes, one for error handling in the Davinci driver probe function and another making the Renesas sh-msiof DT binding documentation correspond to what's actually implemented" * tag 'spi-fix-v4.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: sh-msiof: Match renesas,rx-fifo-size in DT bindings doc with driver spi: davinci: fix handling platform_get_irq result
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-davinci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c
index 3cf9faa6cc3f..a85d863d4a44 100644
--- a/drivers/spi/spi-davinci.c
+++ b/drivers/spi/spi-davinci.c
@@ -992,11 +992,12 @@ static int davinci_spi_probe(struct platform_device *pdev)
goto free_master;
}
- dspi->irq = platform_get_irq(pdev, 0);
- if (dspi->irq <= 0) {
+ ret = platform_get_irq(pdev, 0);
+ if (ret == 0)
ret = -EINVAL;
+ if (ret < 0)
goto free_master;
- }
+ dspi->irq = ret;
ret = devm_request_threaded_irq(&pdev->dev, dspi->irq, davinci_spi_irq,
dummy_thread_fn, 0, dev_name(&pdev->dev), dspi);