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
This commit is contained in:
parent
66c65d90db
commit
38408d0561
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue