Commit 3eb8fccc authored by Rustam Subkhankulov's avatar Rustam Subkhankulov Committed by Helge Deller

video: fbdev: sis: fix typos in SiS_GetModeID()

The second operand of a '&&' operator has no impact on expression
result for cases 400 and 512 in SiS_GetModeID().

Judging by the logic and the names of the variables, in both cases a
typo was made.

Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: default avatarRustam Subkhankulov <subkhankulov@ispras.ru>
Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent b083c22d
...@@ -355,12 +355,12 @@ SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, ...@@ -355,12 +355,12 @@ SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,
} }
break; break;
case 400: case 400:
if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDwidth >= 600))) { if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDheight >= 600))) {
if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth]; if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth];
} }
break; break;
case 512: case 512:
if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDwidth >= 768))) { if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDheight >= 768))) {
if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth]; if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth];
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment