diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-08-14 11:04:45 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-15 03:46:33 +0400 |
commit | 2f123cbcf0ddaf526bd681081a1f2fe8c30ef59a (patch) | |
tree | 568ae4837857067318bba6057509216906e7adcc /drivers/staging/xgifb | |
parent | 95605332997211f377af55d05209c3ef2b86bed1 (diff) | |
download | linux-2f123cbcf0ddaf526bd681081a1f2fe8c30ef59a.tar.xz |
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>
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r-- | drivers/staging/xgifb/vb_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index 80dba6a425ba..fdb7d1a78b3b 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -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); |