Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2148841iof; Tue, 7 Jun 2022 21:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUI+PggoKQiUqaWN722xa6wDafj5JeFg7JqLRVUdrAfu5xx/ghGTRUIncd/kPYJfsueDrw X-Received: by 2002:a05:6a00:10cc:b0:4fe:3f1c:2d1 with SMTP id d12-20020a056a0010cc00b004fe3f1c02d1mr100293654pfu.0.1654662166048; Tue, 07 Jun 2022 21:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662166; cv=none; d=google.com; s=arc-20160816; b=o2PKUNW/W2Fmz1SucGM7Nhp/UY2ylfI4Oqdud685Dw15KlhwiC/CIAXy92x0ULTIPg ab5FheFtBx764Eier52RiZjZOmmj55RHdOVn7kPsuwS432HktHtmtp3GboVjVQ0EPqzO ykfq5R6xuyhKoG0On4IfnkN8R2J55u/KfKdxJUv9qYn7IdVx4KnCnPJnyJcm5AGbLU+O zLksG+tXq2wC040UPmiHWu9anZ+u7PXhwJ/G04S7QJm7dtNdSbNFRPjYBu9TcyR1PmFB mLbekAu9T6kgtvZBNvEEOaL5uoeODlU9MYnSuLG+1AwyJWC/4n+oc2hbCbBaoRWTcff6 p9Xg== 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=b1sIhHRzlt6bih4lQqqqv8FPXfZTZlPJUZ23gzTAqmY=; b=uuZhG85+sijW/zZnIZuWEW2C3OaP9fgfltT8MxM00v/KYRqrw47nD5AB+pEqKW2X7y qLl/N/6t1x5VFNqiH4PY8qvIWnNIt+B8kpc/PanTLOhv5in1is2ot/IJzQqS7qq5IAwS NWjPqWXWIv0ZMP/5stg3G9Y9uLIht4EhILKawhZXyb+FnEeNqU3o7y57VhU48MFrLOcb 4N1K83Y7Ps+g/iswsoiNT8LyL4UH6K5Zlpg/p9dvUbwPW9Koth+31v5ZOGilbrUhLbID 7EeHpZ0nJF3QhRnkb5y6DDXiXsH41HsnXLVrX49nO5vQxjPx1rb3HgQgdw4qD3tPcuMU /vIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RatjAeSC; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f8-20020a17090274c800b0015d49076c06si23424188plt.336.2022.06.07.21.22.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:22:46 -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=@linuxfoundation.org header.s=korg header.b=RatjAeSC; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 77D1B442510; Tue, 7 Jun 2022 21:11:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380637AbiFGWXi (ORCPT + 99 others); Tue, 7 Jun 2022 18:23:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380755AbiFGVQ4 (ORCPT ); Tue, 7 Jun 2022 17:16:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 152DA46656; Tue, 7 Jun 2022 11:57:16 -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 8A48D6156D; Tue, 7 Jun 2022 18:57:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F127C385A5; Tue, 7 Jun 2022 18:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628235; bh=0or0bOVZvhDFy8k7MzwZE5SMX4NHHdVIR77GgpLle00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RatjAeSCIjkUvraUyR3LNyKTSqhoBOpz2tC9SBOUtjniFthHnp9TXy/tPqQVz2TXR DQoO0uChwsmQQTjbag3rJadqp1czjOos4FOQJWOQf1Hqn/fPJv//vFTmlYBQGgosWT 4A0khB616V6loWxXA01Atjp8He17jxZj2CsSTynE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wan Jiabing , Tomi Valkeinen , Sasha Levin Subject: [PATCH 5.18 256/879] drm/omap: fix NULL but dereferenced coccicheck error Date: Tue, 7 Jun 2022 18:56:14 +0200 Message-Id: <20220607165010.280964708@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Wan Jiabing [ Upstream commit 8f2a3970c969d0d8d7289a4c65edcedafc16fd92 ] Fix the following coccicheck warning: ./drivers/gpu/drm/omapdrm/omap_overlay.c:89:22-25: ERROR: r_ovl is NULL but dereferenced. Here should be ovl->idx rather than r_ovl->idx. Fixes: e02b5cc9e898ad ("drm/omap: Add a 'right overlay' to plane state") Signed-off-by: Wan Jiabing Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20220307095612.409090-1-wanjiabing@vivo.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/omapdrm/omap_overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/omap_overlay.c b/drivers/gpu/drm/omapdrm/omap_overlay.c index 10730c9b2752..b0bc9ad2ef73 100644 --- a/drivers/gpu/drm/omapdrm/omap_overlay.c +++ b/drivers/gpu/drm/omapdrm/omap_overlay.c @@ -86,7 +86,7 @@ int omap_overlay_assign(struct drm_atomic_state *s, struct drm_plane *plane, r_ovl = omap_plane_find_free_overlay(s->dev, overlay_map, caps, fourcc); if (!r_ovl) { - overlay_map[r_ovl->idx] = NULL; + overlay_map[ovl->idx] = NULL; *overlay = NULL; return -ENOMEM; } -- 2.35.1