Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2879820rwb; Mon, 15 Aug 2022 13:11:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR6BFU7kup9RSry1MxQlbYPK1IfAsrb0hliNqycwfIC3nWl5jYE9t3YOxieg5qGz+lfJaa1b X-Received: by 2002:a17:906:9bd5:b0:730:a07d:9534 with SMTP id de21-20020a1709069bd500b00730a07d9534mr11303688ejc.747.1660594267277; Mon, 15 Aug 2022 13:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594267; cv=none; d=google.com; s=arc-20160816; b=iN40QM35OT/++LaKBqAoX1IW6TsQT2A9qQdFc+jiOZUeo3e4tL/yraV8+h5CGtFljg DQ43xXUZ6iEb4n8QptOu23w6Km2ul/R5niwvdO4b5pGiUgRIsCrx/OMXNRxAce/KoNO8 RMqsjqXATUHc311/j9K3H7Q5+eUjISD4mj/8CIYY2oehCT7dJchZimosG45lx9aM1Hm3 ugsX/S5AZI7LQD9jS2zwS/I2c2NfrjrIs+78k5oTv2wUv8c0g0Onf5ZUEE37YZhEMHgq sRRh4UFZZmboPj6Yra3re0pg6VzlqIoLvTLlDTv8+0LZLXjGymR4DFRtZokkz1RFYhOg glww== 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=ZmC3JoYe1ZCn800S0vz/IT4MIbNMf6NjAi+pYu2MEVCFfWrTBDCGJilaqOJobs4OdY 4Tt5bNiCIL6U3EvKKtLEhNNy1uu9FwFmBQyJxBfd+wrWEPnaotnSkkNtllzTlsy3yTvJ lf0aACVu3VvewuLaJXap6eQCOb1wpX+gYm/YYWBBiOPOCUok786CnqqkUdhePJYp8tN3 xtHySG92nj2u/2Pixvb/kt9kQ2Xev3l/oXiWlZsFR/tUZ6tshD7FDRR0aJ6PO/UewNT0 aTRjtqLb2Y73J4yftMRQJo6VwskDRbKjSCUUrHhYTnYDW1y8gH3QEVRTcabHS+sSYqRh WU4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U8Xzk4Do; 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 d13-20020a170906640d00b00730f389d620si7009849ejm.422.2022.08.15.13.10.40; Mon, 15 Aug 2022 13:11:07 -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=U8Xzk4Do; 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 S1344860AbiHOTpP (ORCPT + 99 others); Mon, 15 Aug 2022 15:45:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344930AbiHOTl4 (ORCPT ); Mon, 15 Aug 2022 15:41:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEB4667C83; Mon, 15 Aug 2022 11:47:48 -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 ams.source.kernel.org (Postfix) with ESMTPS id E6683B810A4; Mon, 15 Aug 2022 18:47:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E6D6C433D7; Mon, 15 Aug 2022 18:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589265; bh=g+7P8x4nQek5z0FnHiv1VkueNiRjREbVGrtQV0qPJVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U8Xzk4DoD4qD4j5Q8w4S9h6aZ7rDUcrcyBG8KEfFE42VgPJZBws6VHhA6G3xGlaNS 7spOX3enWYZTyBGI/mW+gHBzwwsvobscqKEjnL4BjvgQpJ/JnhXxZt8nmErGUtcqnn 8Q41KZahpngFkWcy6PP7nAfseCGdwA1qeX3i619A= 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.15 633/779] video: fbdev: sis: fix typos in SiS_GetModeID() Date: Mon, 15 Aug 2022 20:04:37 +0200 Message-Id: <20220815180404.402498762@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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