From: Peter Huewe Date: Mon, 13 May 2013 21:41:49 +0000 (+0200) Subject: staging/xgifb: Fix always false condition in vb_setmode.c (smatch) X-Git-Tag: firefly_0821_release~176^2~5845^2~700 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=85b38476fde05b4337115f0e830667e7156c6e2e;p=firefly-linux-kernel-4.4.55.git staging/xgifb: Fix always false condition in vb_setmode.c (smatch) Smatch complains: drivers/staging/xgifb/vb_setmode.c:3181 XGI_SetLockRegs() warn: bitwise AND condition is false here Since SetNTSCTV is defined as 0 in drivers/video/sis/initdef.h this is correct. -> Change the condition to == to fix this. Signed-off-by: Peter Huewe Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 3adec3f18462..5fb699dd1c4c 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -3178,7 +3178,7 @@ static void XGI_SetLockRegs(unsigned short ModeNo, unsigned short ModeIdIndex, if (pVBInfo->VBInfo & SetCRT2ToTV) { if (pVBInfo->TVInfo & TVSimuMode) { if (ModeNo == 0x50) { - if (pVBInfo->TVInfo & SetNTSCTV) { + if (pVBInfo->TVInfo == SetNTSCTV) { xgifb_reg_set(pVBInfo->Part1Port, 0x07, 0x30); xgifb_reg_set(pVBInfo->Part1Port,