Re: [PATCH] staging:iio:dac:ad5504: Check if IRQ was requested before freeing it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/15/2012 8:51 AM, Lars-Peter Clausen wrote:
IRQ support is optional, so we have to check whether it was actually requested
before we attempt to free it.
good spot.

Signed-off-by: Lars-Peter Clausen<lars@xxxxxxxxxx>
Acked-by: Jonathan Cameron <jic23@xxxxxxxxxx>
---
  drivers/staging/iio/dac/ad5504.c |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/iio/dac/ad5504.c b/drivers/staging/iio/dac/ad5504.c
index 6ccf178..cd754d2 100644
--- a/drivers/staging/iio/dac/ad5504.c
+++ b/drivers/staging/iio/dac/ad5504.c
@@ -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);

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux