Skip to contentSkip to conversation

staging: &&/|| typo

PATCH In review Roel Kluin 3 participants 3 messages Feb 15, 2009 – Feb 18, 2009 Staging

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 staging: &&/|| typo

Only error out on unexpected fifo size.

---

drivers/staging/comedi/drivers/rtd520.c +1 -1
index 65d5242..6c7d543 100644
@@ -1234,7 +1234,7 @@ static int rtd520_probe_fifo_depth(comedi_device *dev)
 		return -EIO;
 	}
 	RtdAdcClearFifo(dev);
-	if(fifo_size != 0x400 || fifo_size != 0x2000)
+	if(fifo_size != 0x400 && fifo_size != 0x2000)
 	{
 		rt_printk("\ncomedi: %s: unexpected fifo size of %i, expected 1024 or 8192.\n",
 			DRV_NAME, fifo_size);
#1 lore raw

drivers/staging/comedi/drivers/rtd520.c static int rtd520_probe_fifo_depth(comedi_device *dev) · line 1237

Quoted 2 lines
drivers/staging/comedi/drivers/rtd520.c +1 -1
-	if(fifo_size != 0x400 || fifo_size != 0x2000)
+	if(fifo_size != 0x400 && fifo_size != 0x2000)

What does the presence of this bug say about the probability that this code has ever been used for anything real?

- R.

#2 lore raw
Quoted 5 lines · Roland Dreier

drivers/staging/comedi/drivers/rtd520.c static int rtd520_probe_fifo_depth(comedi_device *dev) · line 1237

Quoted 2 lines
drivers/staging/comedi/drivers/rtd520.c +1 -1
-	if(fifo_size != 0x400 || fifo_size != 0x2000)
+	if(fifo_size != 0x400 && fifo_size != 0x2000)

What does the presence of this bug say about the probability that this code has ever been used for anything real?

With the comedi drivers, I really don't know, they have not had that much wide exposure before, despite being around for a very long time.

thanks,

greg k-h