mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
staging:iio:dac:ad5504: Check if IRQ was requested before freeing it
IRQ support is optional, so we have to check whether it was actually requested before we attempt to free it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4468cb5525
commit
4f0a788dc8
1 changed files with 2 additions and 1 deletions
|
@ -294,7 +294,8 @@ static int __devinit ad5504_probe(struct spi_device *spi)
|
|||
return 0;
|
||||
|
||||
error_free_irq:
|
||||
free_irq(spi->irq, indio_dev);
|
||||
if (spi->irq)
|
||||
free_irq(spi->irq, indio_dev);
|
||||
error_disable_reg:
|
||||
if (!IS_ERR(reg))
|
||||
regulator_disable(reg);
|
||||
|
|
Loading…
Add table
Reference in a new issue