Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759642AbaGCVOK (ORCPT ); Thu, 3 Jul 2014 17:14:10 -0400 Received: from mail-we0-f177.google.com ([74.125.82.177]:61567 "EHLO mail-we0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753129AbaGCVOI (ORCPT ); Thu, 3 Jul 2014 17:14:08 -0400 From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Daniel Vetter , Mauro Carvalho Chehab , "Chen, Gong" , Dan Carpenter , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: sis: init.c: Cleaning up redundant condition is always true Date: Thu, 3 Jul 2014 23:15:21 +0200 Message-Id: <1404422121-11298-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Removal of a redundant condition that is always true This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/sis/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c index bd40f5e..9e2dd96 100644 --- a/drivers/video/fbdev/sis/init.c +++ b/drivers/video/fbdev/sis/init.c @@ -355,12 +355,12 @@ SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay, } break; case 400: - if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDwidth >= 600))) { + if ((!(VBFlags & CRT1_LCDA)) || (LCDwidth >= 600)) { if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth]; } break; case 512: - if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDwidth >= 768))) { + if ((!(VBFlags & CRT1_LCDA)) || (LCDwidth >= 768)) { if(VDisplay == 384) ModeIndex = ModeIndex_512x384[Depth]; } break; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/