From patchwork Fri Apr 7 06:46:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SmFzb24tSkggTGluICjmnpfnnb/npaUp?= X-Patchwork-Id: 13204485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BBA65C77B6F for ; Fri, 7 Apr 2023 06:47:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A875010EAE4; Fri, 7 Apr 2023 06:47:13 +0000 (UTC) Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by gabe.freedesktop.org (Postfix) with ESMTPS id D7C6F10E7E7 for ; Fri, 7 Apr 2023 06:47:05 +0000 (UTC) X-UUID: ff4c7934d50f11eda9a90f0bb45854f4-20230407 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=OhNvpOrTiNR2wjUM2qqmnoQXR+IXyZ1HNN5qN7VtfgI=; b=n0jDbw7CZq0aNY5CLi8qZB6dtNoAwuDAggemis1VlzVEbk0/oapRuVp6fWI973xybEQSxZ+TT7RHn1ijnIl0nxd2zFPbi5R7rWRwq+wbNtctPIexlxCKs3flpFJahFxr7ogrYrgwBE17pfO15uvBsHKv4sq0AEZZLiy54uJ9QmM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22, REQID:be4374be-769d-4660-b1f0-e2a3175a2a68, IP:0, U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:120426c, CLOUDID:b67b9c2a-564d-42d9-9875-7c868ee415ec, B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-UUID: ff4c7934d50f11eda9a90f0bb45854f4-20230407 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 541783092; Fri, 07 Apr 2023 14:47:00 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Fri, 7 Apr 2023 14:46:58 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Fri, 7 Apr 2023 14:46:58 +0800 From: Jason-JH.Lin To: Chun-Kuang Hu , AngeloGioacchino Del Regno Subject: [PATCH 0/5] Fix mediatek-drm coverity issues Date: Fri, 7 Apr 2023 14:46:52 +0800 Message-ID: <20230407064657.12350-1-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Jason-JH . Lin" , Singo Chang , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Project_Global_Chrome_Upstream_Group@mediatek.com, Rex-BC Chen , Jason-ch Chen , Nancy Lin , linux-mediatek@lists.infradead.org, Shawn Sung , Matthias Brugger , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add this patch series to fix these mediatek-drm coverity issues. Jason-JH.Lin (5): drm/mediatek: Remove freeing not dynamic allocated memory drm/mediatek: Add cnt checking for coverity issue drm/mediatek: Add initialization for mtk_gem_obj drm/mediatek: Add casting before assign drm/mediatek: Fix dereference before null check drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 1 - drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 ++-- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 4 ++-- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 29 +++++++++++------------- 4 files changed, 17 insertions(+), 21 deletions(-)