diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2014-01-02 03:04:00 +0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-01-11 15:46:52 +0400 |
commit | 38408d056188be29a6c4e17f3703c796551bb330 (patch) | |
tree | f3be9dfe10cb57894ad0be6cc00b7bfa26b13357 /drivers/staging/iio/adc | |
parent | 66c65d90db1004356281db6ead988e2e38ba9e37 (diff) | |
download | linux-38408d056188be29a6c4e17f3703c796551bb330.tar.xz |
staging:iio:ad799x fix error_free_irq which was freeing an irq that may not have been requested
Only free an IRQ in error_free_irq, if it has been requested previously.
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/staging/iio/adc')
-rw-r--r-- | drivers/staging/iio/adc/ad799x_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c index bad4c8a9d1e9..c1b601acfd90 100644 --- a/drivers/staging/iio/adc/ad799x_core.c +++ b/drivers/staging/iio/adc/ad799x_core.c @@ -594,7 +594,8 @@ static int ad799x_probe(struct i2c_client *client, return 0; error_free_irq: - free_irq(client->irq, indio_dev); + if (client->irq > 0) + free_irq(client->irq, indio_dev); error_cleanup_ring: ad799x_ring_cleanup(indio_dev); error_disable_reg: |