Skip to contentSkip to conversation

staging:iio:ad799x fix error_free_irq, use devm_request_threaded_irq

PATCH Applied Hartmut Knaack 3 participants 3 messages Jan 1, 2014 – Jan 11, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 staging:iio:ad799x fix error_free_irq, use devm_request_threaded_irq

Only free an IRQ in error_free_irq, if it has been requested previously.

---

drivers/staging/iio/adc/ad799x_core.c +2 -1
index e32a555..3deb390 100644
@@ -590,7 +590,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:
Acked-by on v2 1/2
#1 lore raw
Quoted 3 lines · Hartmut Knaack

Only free an IRQ in error_free_irq, if it has been requested previously.

Quoted 20 lines

---

drivers/staging/iio/adc/ad799x_core.c +2 -2
index e32a555..3deb390 100644
@@ -590,7 +590,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:
--

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

maintainer
#2 lore raw
Quoted 6 lines · Lars-Peter Clausen
Quoted 3 lines · Hartmut Knaack

Only free an IRQ in error_free_irq, if it has been requested previously.

I changed the title to only mention the fix as that's all that is now in this patch. Applied to the fixes-togreg branch of iio.git and marked for stable.

Note that given timing this won't go upstream until after 3.14-rc1

Thanks,

Jonathan

Quoted 22 lines
Quoted 21 lines

---

drivers/staging/iio/adc/ad799x_core.c +2 -2
index e32a555..3deb390 100644
@@ -590,7 +590,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:
--

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