[-next,1/3] media/IR/imon: precendence issue: ! vs ==

Message ID 20100504113733.GU29093@bicker (mailing list archive)
State Superseded, archived
Headers

Commit Message

Dan Carpenter May 4, 2010, 11:37 a.m. UTC
  The original condition is always false because ! has higher precedence
than == and neither 0 nor 1 is equal to IMON_DISPLAY_TYPE_VGA.

Signed-off-by: Dan Carpenter <error27@gmail.com>

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

Comments

Jarod Wilson May 4, 2010, 1:54 p.m. UTC | #1
On Tue, May 4, 2010 at 7:37 AM, Dan Carpenter <error27@gmail.com> wrote:
> The original condition is always false because ! has higher precedence
> than == and neither 0 nor 1 is equal to IMON_DISPLAY_TYPE_VGA.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-by: Jarod Wilson <jarod@redhat.com>
  

Patch

diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c
index b65c31a..93b5796 100644
--- a/drivers/media/IR/imon.c
+++ b/drivers/media/IR/imon.c
@@ -975,7 +975,7 @@  static void imon_touch_display_timeout(unsigned long data)
 {
 	struct imon_context *ictx = (struct imon_context *)data;
 
-	if (!ictx->display_type == IMON_DISPLAY_TYPE_VGA)
+	if (ictx->display_type != IMON_DISPLAY_TYPE_VGA)
 		return;
 
 	input_report_abs(ictx->touch, ABS_X, ictx->touch_x);