Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp204229lfu; Wed, 30 Mar 2022 20:51:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNok7UMbsbBR+/5PARjN9ER480lz1aomKVolaHMuQHGO86Mgyd1AnVrdBdtKkPM9cuIYki X-Received: by 2002:a63:384e:0:b0:374:ae28:71fc with SMTP id h14-20020a63384e000000b00374ae2871fcmr9052396pgn.159.1648698662430; Wed, 30 Mar 2022 20:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648698662; cv=none; d=google.com; s=arc-20160816; b=CbDm+9rgu4JO+kBMcD2TtYTEkbff90NuZGbqQcZn8+zFM/VRU3zAkjc94W/gbDJ/Q1 ryjptja0fJROhoElgnFuHZGBBC/74F79yR7AdM0GXBanJFN8CWuqxC1RxGkOblScKVJc 8HXcfcYMIum9Tn4+N32ACPWrfPMv4Q/Fj3iq3olog6umEUYA5h4FH6GLgJenZI4SIgTW qe8z46WEIHZj0WNzekJXmxSetThiciS3/xsqEruUxYZzZooK291/TnfW3Xw4vAHwm9+U S1XsLS/0qBKMD8UB0px4Vn5SyAyslzxF0SjrlFTk/M9Lkf8Kg8VeYBzNEjF1yTAQ+i4U GJKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=Mw0Xb3acT/jJngaoGEDh96qavNQRf5DbODEg2Ia3G20=; b=v+xpFS2eGVsl+q3ZL3CMNN60/9TKdmDONQsVxoJ2tLEAmOTDa481wSKwDMzes2hWFG iPe4AguwRgPtmtrG+H43crgnh0WfSqyiRfYn/oYalCi/U0jOZ74UFcURemJ2DWdKukV6 5HJukgE6TOKb/X8XBII3fRvVd4Ha933QECtdhpyD4buOkx4J1wPQtpuBHjr3S21wmdlF jQ+5S0hwRG+2xprVnIbM9klT2l5l3biV4T8ZDujwz9jD6hcEA8CoGkCUqtkpfP05jWaF /3QCdE7gvY6ezPYPlJzU5DVYbAAOOidlmWq84sCavliv/wVE4qk2rP6/p8OtCH274G4+ ROmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j6tRbHGh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id il2-20020a17090b164200b001bd14e01fbasi2357876pjb.168.2022.03.30.20.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:51:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j6tRbHGh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 66E8250E0D; Wed, 30 Mar 2022 20:04:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343525AbiC3MUj (ORCPT + 99 others); Wed, 30 Mar 2022 08:20:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347312AbiC3MGL (ORCPT ); Wed, 30 Mar 2022 08:06:11 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C1E16432 for ; Wed, 30 Mar 2022 05:03:32 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id w7so15813239pfu.11 for ; Wed, 30 Mar 2022 05:03:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Mw0Xb3acT/jJngaoGEDh96qavNQRf5DbODEg2Ia3G20=; b=j6tRbHGh4PwL7QVNwVCLvVVrcrP+486cq3+/B0xQQu2bAJsOtuKDqRaidYYvWi8QiJ 9EBrPA+wjyOnufhmgXp/tCoEIh6VuWtCqEFwoSgY1CBncvyGFo9i+MZjB3+4aGb0rGGO g/6gkLtPfHVx/nmbA1pOqMUqcXQ/XnRC6opt0Y6pe3t+W/SBvFPGxGPWP1xXk1kcUjJm cRGYrS8ElkYE0UHThjswLXBZLSQQhtflN0tCC5ZbPDWpKOgvbfieOitc+xecRpvTo9QK 8RRWp9rlO2FSN+AoX9nuBUIwGA+flgagxlgF12DgERG2eEJtR/zbLyUS2hZ1ei1CPreK SuVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Mw0Xb3acT/jJngaoGEDh96qavNQRf5DbODEg2Ia3G20=; b=wGU9W7A+sOpP2nPXg5XJm1vBFpdRbG60i5BZDUxjnnYnrbTDziyAWNU2fCfNiGelAT ZdJotmCsqZzEVRw7H/gIyOR12OgKYYnnJ5rkXiwOxoDqvhN9IfUGDPtL3LDi1mc87g/3 xrEs21TE1+rQLFKkV2AAi/nCn1shsOjO/I7wU6C6HRzSYlIWZbcnlNbYNkG6ET0+yP0j CIDtjCjYYo2TtERmWVmkRjsQcluazL6JgyW9Xp7kiuPPVpOt4thDJnCu4oeDsaLfCSI9 E4J8rXcccENwKgqZxo3wSuIxLkvj7D3Dov9Zag8Y4ZMs675KPW4rY/FvkGAFnw4+tnBq trRQ== X-Gm-Message-State: AOAM530LcQeacShpf5kQ87IZ9Z8Bcn2bmzM5ofYZJZipbV5qU/QterzN /RmHghLjw1OIB+l+0wAi99s= X-Received: by 2002:aa7:8211:0:b0:4f7:8b7:239b with SMTP id k17-20020aa78211000000b004f708b7239bmr32372071pfi.64.1648641811381; Wed, 30 Mar 2022 05:03:31 -0700 (PDT) Received: from localhost ([119.3.119.18]) by smtp.gmail.com with ESMTPSA id oo17-20020a17090b1c9100b001bf0ccc59c2sm6446120pjb.16.2022.03.30.05.03.30 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Mar 2022 05:03:30 -0700 (PDT) From: Xiaomeng Tong To: patrik.r.jakobsson@gmail.com, airlied@linux.ie, daniel@ffwll.ch Cc: rob@ti.com, yakui.zhao@intel.com, airlied@redhat.com, alan@linux.intel.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Xiaomeng Tong Subject: [PATCH 4/5] gma500: fix a missing break in cdv_intel_dp_set_m_n Date: Wed, 30 Mar 2022 20:02:45 +0800 Message-Id: <20220330120246.25580-5-xiam0nd.tong@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220330120246.25580-1-xiam0nd.tong@gmail.com> References: <20220330120246.25580-1-xiam0nd.tong@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Instead of exiting the loop as expected when an entry is found, the list_for_each_entry() continues until the traversal is complete. It could lead to a invalid reference to 'lane_count/bpp' after the loop. The invalid reference to 'lane_count/bpp' is here: cdv_intel_dp_compute_m_n(bpp, lane_count, To fix this, when found the entry, add a break after the switch statement. Fixes: 8695b61294356 ("gma500: Add the support of display port on CDV") Signed-off-by: Xiaomeng Tong --- drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c index ba6ad1466374..e6473b8da296 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_dp.c +++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c @@ -1016,6 +1016,8 @@ cdv_intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode, bpp = dev_priv->edp.bpp; break; } + + break; } /* -- 2.17.1