Commit 39779455 authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Greg Kroah-Hartman

staging:iio:ad799x fix error_free_irq which was freeing an irq that may not have been requested

commit 38408d05 upstream.

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent db438cf1
......@@ -644,7 +644,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:
......
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