Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1964575pxp; Mon, 7 Mar 2022 06:01:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7qhZQiG0Ta4CnsgciWa7e3Z44ScttzzTDWhRBrayg2OnLjgHhVI0a2tCz4A76jFVCS2T+ X-Received: by 2002:aca:f07:0:b0:2d9:a01a:4bfc with SMTP id 7-20020aca0f07000000b002d9a01a4bfcmr6910606oip.291.1646661711249; Mon, 07 Mar 2022 06:01:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646661711; cv=pass; d=google.com; s=arc-20160816; b=fH6PkXoyyLCoLtRGHYhZA4crdXL7upvIj5+UuhMZTZchCQEmvzdkOFysJMvZerueIT 0GiMaWkKJ10eS5xJRk09iMWC2A+7tOkLnoiKQFK6H7vdo6vwQ3i1RudtWNtSIzQ1Ewf1 hOIqjf1I5h/woD5wS+VPbEHBfTwgdAGWV8EJ0zweCwgDfW88JTgCq2xY5xMZctCJ/7cP Yr3OgONLoYdFhmUGiK/RLpse/Bko/kwKSX8wiBmveOtw15l03fzDPft2RVE36GbQnW2/ UaKiGR2CjOyYBjegR9aOMrbxmpmv8/A5Og8LDNSSNoRI/wIMgq3ilYMgbhKcGzjqpSvI FlRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=UcjSFt6u4NSsFSgY6g9g/sb4Od9X0lYnTX4YrUwJW0s=; b=OI6pIqy8Z9tPiKN0bF7zuda7g5iifksovrPmbckcnjbRusAFJk0D9/BqpYrbW8czp9 INSoUJqxJ9bqTX2c7W6lov5YH8ywnGbafNurreDOXYNuEiw5+zSrI4CosQitBm2rkqWj v1r6WRQnGi1aQEz6+bZ9Vk/+abHZQaOplJFqZR0oqS0+HEGelKSySFJ1R2Gmlskd3fmP zwVCBzW0IHcLpDcfcSdLOEHum7KGS1lJ6SDXBPTFWrNnq/JEY2ZlQ5DWD1nXkClmKgzL mS6PQa7ICzfPa7rVPRJFTv71ofENwDtaIJyInQc9T84gqDxERhz+OSboPk1Cv5QcZ+NT afyA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=XdAfvJ8Q; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a056808200b00b002d7988a57fesi9070636oiw.89.2022.03.07.06.01.28; Mon, 07 Mar 2022 06:01:51 -0800 (PST) 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=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=XdAfvJ8Q; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240857AbiCGKh5 (ORCPT + 99 others); Mon, 7 Mar 2022 05:37:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237718AbiCGKOY (ORCPT ); Mon, 7 Mar 2022 05:14:24 -0500 Received: from APC01-HK2-obe.outbound.protection.outlook.com (mail-hk2apc01on0720.outbound.protection.outlook.com [IPv6:2a01:111:f400:febc::720]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 649AD7A9A6 for ; Mon, 7 Mar 2022 01:56:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OInw9ptdhThV942f9FPz0Rd/hpHJ8wsmRpbShPX41jZ2IgkqhxNVP7v0R58EZQ0evsJt9DWQZzoacET9nX9X8uLGuhdlP3w8u8bAVv+I1SYXY8puNdkI8mKnwKkbA3vJymshWxHqo6hDlu4tXACrqWU2X8Y+SGv0QcXTVIq1MWOWvkduO6JWL9tKIe58u8uWg6qHkSqGn3myxpMIjeKd07k6dcDbebh68wrxXdsK8KY0UScxFDWahN+Q5y57WI3eOksdXVbL6Td6roTSGUewvhCZR0evtI4YoDr/VeybujtU8CXnK7mMde8txNSB2PN+DkLJFjEzqegfxXKRrggY3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UcjSFt6u4NSsFSgY6g9g/sb4Od9X0lYnTX4YrUwJW0s=; b=mpoecq7nmPXNUCy/fBFRVQYuwnlZ6tA2UHYf8/YjhCMQwuMK0AyUPOtEZPuqkjysFucBZ7vCAlSb80AbGd5e/u6cpTnbCNHlCm1NTnJLvu4JLE8vAaRs6Um6gDoY17EoXO4LbAAlh86WaMWXcOir9oVLyXw2mV+9kZUlb7v5DGB5FcMVdMJC3IRzxe+A3WnP5P+RN5jmRyGEwkg476S3XatPBhx5sTRdDtmxHT6eXGUtWMqJds7yRl6HIb9/YjuMyqAH6hkcCVD05xdllgBPkFXm/jDfFlIRz09T4zhBs4VSvCzha8QGbqIb8aupYO+HVIhX7/gxqae0+pgRvtt/SQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UcjSFt6u4NSsFSgY6g9g/sb4Od9X0lYnTX4YrUwJW0s=; b=XdAfvJ8QgrWAQSGdN3/PYy9FoueHrPlRTZ5MKzG2hLuYabeTj/EfB6GVjv5ViylWV+c+/oSbH2KWBR/NiMeftaO9rqsauKTNfdgcHISTyKfGznKUbQV0G8CKr2W4Mo83kxXbHiLeKxiUI5c/f/DqfDDRrybtiQXIYmiQPdW/IVM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) by SEZPR06MB5071.apcprd06.prod.outlook.com (2603:1096:101:39::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Mon, 7 Mar 2022 09:56:30 +0000 Received: from SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::9d3f:ff3b:1948:d732]) by SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::9d3f:ff3b:1948:d732%4]) with mapi id 15.20.5038.026; Mon, 7 Mar 2022 09:56:30 +0000 From: Wan Jiabing To: Tomi Valkeinen , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: kael_w@qq.com, Wan Jiabing Subject: [PATCH] drm/omap: fix NULL but dereferenced coccicheck error Date: Mon, 7 Mar 2022 17:56:12 +0800 Message-Id: <20220307095612.409090-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: HK2PR03CA0050.apcprd03.prod.outlook.com (2603:1096:202:17::20) To SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bd23b7b9-a011-4c5a-68b5-08da0020c105 X-MS-TrafficTypeDiagnostic: SEZPR06MB5071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rDUe4FSNJ/Iu9cSgMveZhzTTQt5/dxckq2tv1W63vAfRO9dkcuYsB9Vp3qEFy6L3q4K0IpmLLp15LROVSPJhI9AKdKN40Koxw6u7ibpsenxPf6EjXm5CUD2UDGd/BbCZpb67VlxznO0UfC05GXOaDOe2IMckHWEx6gyl07mqged6yCUkVG8CNPxQShRbdVUrj6pteuXRYW8JPEIRXsUCfM7beClaxNG1Fu/nOlVvgWWO4d9qOI1BonSMrkPm7cPVu6B6xFwa6rlAjcvqo09VaVLBm+BJ1CacOjo5MRHioU61R3OZctYU95mtW5s6tG2tPEuxvqo8V8gEtz8HgpkOyT+mRjvMe9oYPIG3hXapBiuqLAXUThwbLX2kvfwYpWj+q9fqpWoj2Yd2/cZDGJoibTKoyCeVlduqXur0GuzSw34iZJ/Xyo+n6zp2pmuEkbuZNGiCosOqZgeBrNqjrQbtJ9q1uAUJaMoia/WSZ0wbzhlAloxPrwSFDFiOoNXsVWpXXo6H3k2JtNylGW7+IoDEMEZBXfUSxUGWJgrHv7NwrlPKjS8ow0EtDkcSjyVcLDQP3xT5iHibZ3rRIpS4Nym5C8Tr2Sh9bSq8PMh3a55BJN9rMkVlLfreSvqRFJz8qHSDhg1pigE5oWXqKwYMViCxMFxPIwBkm80rHO6rJQUXzhbuZesFgwzjwCGGbfEVgjqI/N73Op8mbOr7D9hJ2Xh0qQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB3367.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(66556008)(66946007)(107886003)(52116002)(8936002)(66476007)(4744005)(2616005)(1076003)(186003)(26005)(8676002)(4326008)(5660300002)(86362001)(83380400001)(508600001)(36756003)(6506007)(6666004)(6512007)(110136005)(2906002)(38350700002)(38100700002)(316002)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?J4HmWOH5MdEF5hVUFvZRamGPIXLBPADEcXqH+iFaPjQbbXD12a2AxkbvqD+G?= =?us-ascii?Q?pEgiF/uDW4laK0/0O95UpIgwcF8kNCVDfhVm4FDLKm+Ei8Qy/xqSsqsDjiCn?= =?us-ascii?Q?unRK46j5O7Mp/vM7TzBzcTw1dM/mSRKR7k4Yg0kvMzQnLQ+LivuIAjT5gpxO?= =?us-ascii?Q?zTRSaIp+0ik5QJHwhc6EzAbBXmC4XWpm8i0k6+80AVRb47vur+U6bk8NlTaP?= =?us-ascii?Q?UKvpUsZ05unz4DVXfw8TeHYIj8JOr7t5KG/mYAUVin/6AHKJS6aq36OrjVFT?= =?us-ascii?Q?u2RAjujcjKvry5lDnEkA0fyWAlXlPErTskeaQ5uZH1V7TPtJrY7tO6hbs4A0?= =?us-ascii?Q?kvjRkWOkNsVEacy19fwY3VsHbA+mQVwSMyCjRGzX4Jdwi+u7lUrEtYAlp0o3?= =?us-ascii?Q?55jYX5Dh+aytormec2GkxVFCODwye+RVLgecd48HRBnrf6qU5JRfUAS0VLj7?= =?us-ascii?Q?aT55jGMRDW1Ev7TG/rnQ3mqEqAfXZ1AqHhXHFG6IcDFR6YGINGErBnQFcKcZ?= =?us-ascii?Q?t3oVG3Yp7TbLp0aQr3NYEV8vO/sR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q?NK3mi7k0Zzm9dU+TB7CdnQwNsayQAhAfQDAB1HEKzxTMnsqP28kzVr1mJkTe?= =?us-ascii?Q?uCKE5Fd4PfM4t99vniiOJhE9sQM9VwuUW2GbtwLAo8O6BodHwPGLPI1eJlWf?= =?us-ascii?Q?/lgD1yIkasLWS7mrTPSg9BetVIgZjtutvSIKr36OB1HPuI30t5dZp+pm0dl6?= =?us-ascii?Q?fuHP3X8pVmfsGhxsh2m7rpk=3D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd23b7b9-a011-4c5a-68b5-08da0020c105 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB3367.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2022 09:56:30.6469 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5vvOYnygho/cbRWRejA8bxBKkCh5B+heuEbYXer2nxoKvTZ3wlMf7lMmKyMx6tAtA8MA6g2lsZgXYmFSQ8Wf0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5071 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_PASS,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 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. Signed-off-by: Wan Jiabing --- 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