Skip to contentSkip to conversation

omap24xxcam-dma: Fix logical test

PATCH In review Joe Perches 2 participants 2 messages Nov 27, 2011 – Nov 28, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omap24xxcam-dma: Fix logical test

Likely misuse of & vs &&.

---
 drivers/media/video/omap24xxcam-dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/omap24xxcam-dma.c +1 -1
index 1d54b86..3ea38a8 100644
@@ -506,7 +506,7 @@ int omap24xxcam_sgdma_queue(struct omap24xxcam_sgdma *sgdma,
 	unsigned long flags;
 	struct sgdma_state *sg_state;
 
-	if ((sglen < 0) || ((sglen > 0) & !sglist))
+	if ((sglen < 0) || ((sglen > 0) && !sglist))
 		return -EINVAL;
 
 	spin_lock_irqsave(&sgdma->lock, flags);
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Joe Perches

Likely misuse of & vs &&.

Thanks, Joe!

Quoted 23 lines
---
 drivers/media/video/omap24xxcam-dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/omap24xxcam-dma.c +1 -2
index 1d54b86..3ea38a8 100644
@@ -506,7 +506,7 @@ int omap24xxcam_sgdma_queue(struct omap24xxcam_sgdma *sgdma,
 	unsigned long flags;
 	struct sgdma_state *sg_state;
 
-	if ((sglen < 0) || ((sglen > 0) & !sglist))
+	if ((sglen < 0) || ((sglen > 0) && !sglist))
 		return -EINVAL;
 
 	spin_lock_irqsave(&sgdma->lock, flags);
 
 
--

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

Signature · 2 lines
Sakari Ailus
e-mail: [email protected]	jabber/XMPP/Gmail: [email protected]