Skip to content

Commit

Permalink
Staging: xgifb: fix bitwise vs logical bug
Browse files Browse the repository at this point in the history
This is a static checker fix and not something I can test.  The intent
of the code here is to set some bit flags.  For a logical OR the ">> 1"
shift wouldn't make a difference.  So it should be using a bitwise OR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Aug 14, 2012
1 parent 9560533 commit 2f123cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/xgifb/vb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ static unsigned char GetXG27FPBits(struct vb_device_info *pVBInfo)
if (temp <= 2)
temp &= 0x03;
else
temp = ((temp & 0x04) >> 1) || ((~temp) & 0x01);
temp = ((temp & 0x04) >> 1) | ((~temp) & 0x01);

xgifb_reg_set(pVBInfo->P3d4, 0x4A, CR4A);

Expand Down

0 comments on commit 2f123cb

Please sign in to comment.