Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Rustam Subkhankulov <subkhankulov@ispras.ru>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Rustam Subkhankulov and committed by
Helge Deller
3eb8fccc b083c22d

+2 -2
+2 -2
drivers/video/fbdev/sis/init.c
··· 355 355 } 356 356 break; 357 357 case 400: 358 - if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDwidth >= 600))) { 358 + if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDheight >= 600))) { 359 359 if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth]; 360 360 } 361 361 break; 362 362 case 512: 363 - if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDwidth >= 768))) { 363 + if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDheight >= 768))) { 364 364 if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth]; 365 365 } 366 366 break;