Skip to contentSkip to conversation

dma/mic_x100_dma: IS_ERR() vs PTR_ERR() typo

PATCH In review Dan Carpenter 2 participants 2 messages Feb 29, 2016 – Mar 3, 2016

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

PATCH 1/1 dma/mic_x100_dma: IS_ERR() vs PTR_ERR() typo

This is harmless because the caller only cares about zero vs non-zero but we should be returning PTR_ERR() here.

drivers/dma/mic_x100_dma.c +1 -1
index 068e920..1502b24 100644
@@ -483,7 +483,7 @@ static int mic_dma_setup_irq(struct mic_dma_chan *ch)
 			mic_dma_intr_handler, mic_dma_thread_fn,
 			"mic dma_channel", ch, ch->ch_num);
 	if (IS_ERR(ch->cookie))
-		return IS_ERR(ch->cookie);
+		return PTR_ERR(ch->cookie);
 	return 0;
 }
 
#1 lore raw
Quoted 2 lines · Dan Carpenter

This is harmless because the caller only cares about zero vs non-zero but we should be returning PTR_ERR() here.

Applied thanks

Signature · 1 line
~Vinod