提交 38408d05 编写于 作者: H Hartmut Knaack 提交者: 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: NHartmut Knaack <knaack.h@gmx.de>
Acked-by: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
Cc: stable@vger.kernel.org
上级 66c65d90
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册