Skip to contentSkip to conversation

staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler

PATCH New Karim Eshapa 1 participant 1 message Jun 28, 2018

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

PATCH 1/1 staging:iio:adc:ad7280a: Use GFP_ATOMIC in interrupt handler

Use GFP_ATOMIC rather GFP_KERNEL in interrupt handler, as GFP_KERNEL may sleep according to slab allocator.

---
 drivers/staging/iio/adc/ad7280a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7280a.c +1 -1
index b736275c10f5..25c4fbc303f7 100644
@@ -692,7 +692,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)
 	unsigned int *channels;
 	int i, ret;
 
-	channels = kcalloc(st->scan_cnt, sizeof(*channels), GFP_KERNEL);
+	channels = kcalloc(st->scan_cnt, sizeof(*channels), GFP_ATOMIC);
 	if (!channels)
 		return IRQ_HANDLED;
 
Signature · 1 line
2.17.1