From patchwork Mon Apr 3 08:14:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junhao He X-Patchwork-Id: 13197794 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 19C03C77B62 for ; Mon, 3 Apr 2023 08:16:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=eg9RgJOyUAMFF5EJpJtFEOs/0lo1hpn267FHMLMq6Mg=; b=peiBB8TF/qSPC+ jTGyAei8CtzeBX7DW367F0XF/0vBCr4JuWoufM8zfRe6hdT5APbPf85NfHHn0R8xamXrgJ2nMflBV c1m8jrWrbgoUt90IHAvd3lHHfQXerD+7G5OfD/Ie2LSMYgy+Q6NBJQAJmX492GYQdfblpzJMJP+6G nH8WlzEZ51iMMtXgdNVlpx3eo1EAGdg6YuhFtjbf365lj4e66YFan8fMAn/sBK2B/JzSrnW8yWIAZ xh8AYTFA4u9uClg551fHe9qW0AjZdj/FLzX0A9CAphpZ7l5CRa2Qg7P1931VvckVDd+w31/WvCcgC HXfTpB0xyrtJ7MCTaIrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pjFM0-00EUdz-3B; Mon, 03 Apr 2023 08:15:52 +0000 Received: from szxga08-in.huawei.com ([45.249.212.255]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pjFLw-00EUZ1-38 for linux-arm-kernel@lists.infradead.org; Mon, 03 Apr 2023 08:15:50 +0000 Received: from dggpeml500002.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4PqkC35NVQz17PNM; Mon, 3 Apr 2023 16:12:15 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggpeml500002.china.huawei.com (7.185.36.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 3 Apr 2023 16:15:37 +0800 From: Junhao He To: , , , CC: , , , , , , , , Subject: [PATCH 0/2]Fix NULL pointer and doing cleanup Date: Mon, 3 Apr 2023 16:14:21 +0800 Message-ID: <20230403081423.62460-1-hejunhao3@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500002.china.huawei.com (7.185.36.158) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230403_011549_175859_43B2B61E X-CRM114-Status: UNSURE ( 6.71 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fix NULL pointer and cleanup redundant initialized. Junhao He (2): drivers/perf: hisi: Remove redundant initialized of pmu->name drivers/perf: hisi: add NULL check for name drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c | 2 +- drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 19 +++++++++++-------- drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 9 ++++++--- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 13 ++++++------- drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 2 +- drivers/perf/hisilicon/hisi_uncore_pmu.c | 4 +--- drivers/perf/hisilicon/hisi_uncore_pmu.h | 3 +-- drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c | 2 +- 8 files changed, 28 insertions(+), 26 deletions(-)