Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f0a788d authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Greg Kroah-Hartman
Browse files

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4468cb55
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -294,6 +294,7 @@ static int __devinit ad5504_probe(struct spi_device *spi)
	return 0;

error_free_irq:
	if (spi->irq)
		free_irq(spi->irq, indio_dev);
error_disable_reg:
	if (!IS_ERR(reg))