Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3256961rwb; Mon, 15 Aug 2022 22:29:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR4LmLQfQ/3qq43OuEfC24eEGlHSZwx7syctkvetR5WavO1Q2A6u1oSUPk7FPRV71rnD2KO1 X-Received: by 2002:a17:907:7fa1:b0:734:b26a:17bc with SMTP id qk33-20020a1709077fa100b00734b26a17bcmr12273410ejc.157.1660627771235; Mon, 15 Aug 2022 22:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660627771; cv=none; d=google.com; s=arc-20160816; b=nicT4tvUPLLRsWFvIdYDm+FTjbYKn5vtzSVmH0h1yjQQnXj7ujcUqKLrwfuj8/NIpW +OoCgGjILuRTOtP1OcnxxcgIC1KlQF4llPZS9emufssj565ne9p3tVeTVJxa8Tty6fdJ BKdC5K//DLOdkJmORX2ve89p/kV3DSemtl82ja4i78JZYEQm7yCc0RqFnJUE3SnJOh3B qlxwG2PX5hBVXFT1OAObkaHGhfC4zLY1cHvUWyXSf0lJ4L8CqLR9/rCjnxIj+355emWd K8GD8d1C2iDXILwRsOvWdnBJ9NzjORugme2Ewf8ofuwKmj0VkEFO2w97klEhfl5x0Vlp MHXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CgwYLF9wwVOS3BBUl8fbzhJocAK1bmAEUtfHR2V1CRA=; b=k0QxSYPAy04a+MrArMyO+n7qGbJpAQwAsS1enubdaF4DWhvC0wfCC0N/ar9km3S2L3 7+2jvwCbAIxzAnuA9xVmTMpiNB7qQJ+gPBf9YE6h5NiKn+j1P8L1sytw+OPCkRBF5gSK mV+Yh081A7vTnhSARpiBwkF0D9Li08O94XtX8xZFib3mIH6xg143UDBywLqY65iAAkS1 OnL6dPebiJAXAHeAjDLdqx7vTLkrRo7SxCxdABXy4feUyp+nZnlhcBiSX72+Awjy6dvn LGLKnGZa3KjVSSentaB2C6+rYvIG/JBrTV5Pq4XGwuvvma+JxueDWjUOgijDIu8a6NR0 POyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NtArGsah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a50e60c000000b0043ab611258bsi8283193edm.627.2022.08.15.22.29.03; Mon, 15 Aug 2022 22:29:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NtArGsah; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232514AbiHPEtQ (ORCPT + 99 others); Tue, 16 Aug 2022 00:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232678AbiHPEpp (ORCPT ); Tue, 16 Aug 2022 00:45:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC59B10F; Mon, 15 Aug 2022 13:42:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 71C6F60F60; Mon, 15 Aug 2022 20:42:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C0E2C433D6; Mon, 15 Aug 2022 20:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596158; bh=g+7P8x4nQek5z0FnHiv1VkueNiRjREbVGrtQV0qPJVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NtArGsahg0KBsT+IkzBNpM1kkDZTUtnQlJiNGDqS/ijUlttQaXIxB+/1HUFZi7Hc4 iSuhOjBhujHIkeFjzeHip7h1DilQ8XyY0EdRzeRpD2sU4RQAo8+cc+g3UZetknabu+ cJr1USDv91xsqTH7H5T+QGUe/9Wh5Mt0sxsG1FuM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rustam Subkhankulov , Helge Deller , Sasha Levin Subject: [PATCH 5.19 0991/1157] video: fbdev: sis: fix typos in SiS_GetModeID() Date: Mon, 15 Aug 2022 20:05:47 +0200 Message-Id: <20220815180519.368392861@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rustam Subkhankulov [ Upstream commit 3eb8fccc244bfb41a7961969e4db280d44911226 ] 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 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Helge Deller Signed-off-by: Sasha Levin --- 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 b568c646a76c..2ba91d62af92 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 >= 800) && (LCDheight >= 600))) { if(VDisplay == 300) ModeIndex = ModeIndex_400x300[Depth]; } break; 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]; } break; -- 2.35.1