Staging: xgifb: fix bitwise vs logical bug

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>
This commit is contained in:
Dan Carpenter 2012-08-14 10:04:45 +03:00 committed by Greg Kroah-Hartman
parent 9560533299
commit 2f123cbcf0

View file

@ -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);