* [patch 2/2] Staging: tm6000: silence Sparse warning "dubious: !x |
@ 2011-01-03 5:47 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-01-03 5:47 UTC (permalink / raw)
To: kernel-janitors
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"
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/staging/tm6000/tm6000-input.c b/drivers/staging/tm6000/tm6000-input.c
index aee5e85..dae2f1f 100644
--- a/drivers/staging/tm6000/tm6000-input.c
+++ b/drivers/staging/tm6000/tm6000-input.c
@@ -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 */
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-03 5:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 5:47 [patch 2/2] Staging: tm6000: silence Sparse warning "dubious: !x | Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox