Commit 38408d05 authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron

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: default avatarHartmut Knaack <knaack.h@gmx.de>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Cc: stable@vger.kernel.org
parent 66c65d90
...@@ -594,6 +594,7 @@ static int ad799x_probe(struct i2c_client *client, ...@@ -594,6 +594,7 @@ static int ad799x_probe(struct i2c_client *client,
return 0; return 0;
error_free_irq: error_free_irq:
if (client->irq > 0)
free_irq(client->irq, indio_dev); free_irq(client->irq, indio_dev);
error_cleanup_ring: error_cleanup_ring:
ad799x_ring_cleanup(indio_dev); ad799x_ring_cleanup(indio_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment