diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-06-04 11:36:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-05 13:47:32 +0900 |
commit | 4f0a788dc892d62fabcfd61b289b6212bdedadfd (patch) | |
tree | 1d398654e33aafb645a9af7e9b515df8d28dbf54 /drivers | |
parent | 4468cb552536731fd85f22a367602e9242a55376 (diff) | |
download | blackbird-obmc-linux-4f0a788dc892d62fabcfd61b289b6212bdedadfd.tar.gz blackbird-obmc-linux-4f0a788dc892d62fabcfd61b289b6212bdedadfd.zip |
staging:iio:dac:ad5504: Check if IRQ was requested before freeing it
IRQ support is optional, so we have to check whether it was actually requested
before we attempt to free it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/dac/ad5504.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/iio/dac/ad5504.c b/drivers/staging/iio/dac/ad5504.c index 220150d2a165..f3d7b47cfe1d 100644 --- a/drivers/staging/iio/dac/ad5504.c +++ b/drivers/staging/iio/dac/ad5504.c @@ -294,7 +294,8 @@ static int __devinit ad5504_probe(struct spi_device *spi) return 0; error_free_irq: - free_irq(spi->irq, indio_dev); + if (spi->irq) + free_irq(spi->irq, indio_dev); error_disable_reg: if (!IS_ERR(reg)) regulator_disable(reg); |