Skip to contentSkip to conversation

pwc: precedence bug in pwc_init_controls()

PATCH In review Dan Carpenter 2 participants 2 messages Jul 23, 2011 – Jul 24, 2011

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

PATCH 1/1 pwc: precedence bug in pwc_init_controls()

'!' has higher precedence than '&' so we need parenthesis here.

drivers/media/video/pwc/pwc-v4l.c +1 -1
index e9a0e94..8c70e64 100644
@@ -338,7 +338,7 @@ int pwc_init_controls(struct pwc_device *pdev)
 	if (pdev->restore_factory)
 		pdev->restore_factory->flags = V4L2_CTRL_FLAG_UPDATE;
 
-	if (!pdev->features & FEATURE_MOTOR_PANTILT)
+	if (!(pdev->features & FEATURE_MOTOR_PANTILT))
 		return hdl->error;
 
 	/* Motor pan / tilt / reset */
#1 lore raw

Hi,

Thanks I've added your patch to my gspca/pwc tree and send an updated pull request to Mauro including your patch.

Regards,

Hans

Quoted 17 lines · Dan Carpenter

'!' has higher precedence than'&' so we need parenthesis here.

drivers/media/video/pwc/pwc-v4l.c +1 -1
index e9a0e94..8c70e64 100644
@@ -338,7 +338,7 @@ int pwc_init_controls(struct pwc_device *pdev)
  	if (pdev->restore_factory)
  		pdev->restore_factory->flags = V4L2_CTRL_FLAG_UPDATE;
 
-	if (!pdev->features&  FEATURE_MOTOR_PANTILT)
+	if (!(pdev->features&  FEATURE_MOTOR_PANTILT))
  		return hdl->error;
 
  	/* Motor pan / tilt / reset */