Skip to contentSkip to conversation

Staging: tm6000: silence Sparse warning "dubious: !x |

PATCH In review Dan Carpenter 1 participant 1 message Jan 3, 2011

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

PATCH 2/2 Staging: tm6000: silence Sparse warning "dubious: !x |

Bitwise and logical or are the equivalent here, so this doesn't affect runtime, but logical or was intended. The original code causes a warning in Sparse: "warning: dubious: !x | !y"

drivers/staging/tm6000/tm6000-input.c +1 -1
index aee5e85..dae2f1f 100644
@@ -376,7 +376,7 @@ int tm6000_ir_init(struct tm6000_core *dev)
 
 	ir = kzalloc(sizeof(*ir), GFP_KERNEL);
 	rc = rc_allocate_device();
-	if (!ir | !rc)
+	if (!ir || !rc)
 		goto out;
 
 	/* record handles to ourself */