Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp475468ybe; Wed, 4 Sep 2019 02:48:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVx2cy1X6qQg5+gys/SoH2bEtwPittFFiHCUeVerV8j/JHEcAUWiBOv1j6Gm98Zdql7mrC X-Received: by 2002:a63:30c6:: with SMTP id w189mr33168827pgw.398.1567590494561; Wed, 04 Sep 2019 02:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567590494; cv=none; d=google.com; s=arc-20160816; b=gDAHP+qbSBmYdnouf8Ca8MsP34EaMWf6muHDoMhpiN7jRUkCwu4nBLAhULDN5vy76T 7zoanvPz3vqailggCIravacoCZiLaAZgMN9IX+nNKd3c0ExVeZIYah8cJ5O324I58av7 lFzwz8VcVGG0QbsNyNWWZyD/95/Bt9AX/0oHESk2HxmsRbZMg76aaWbul9ZcEMrCl79R VJmGDMxZW9g/fDU1Zb18C1kqAVoCp9tSp7AVUn9bWL3H8QLgyT/gvIWM8Zqkwu78jnJ2 35qjhWZPFEzd/ncsZLAfeUrHlAcdAKKcdzwyt+d5uH/0n9BTeaS+hg5q6LJG61AKXXmJ iEsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=L6dqRAkepNwT6GOWOIHythz3SKrAFWewE+RIHd8zpFE=; b=cfQ8P/dWc6PatvQj+nXf6SyM/geK3KV9vR+hb9t+Kxr3NKz+gbn7vSrMZONOiWvWqM Rdj3AhTG0xCI1I0YmhuWJOSb/upYzQZl5uWosHpLYk5GFRTQkv4j2Vmd0kueqxcg5oaq pMwR9mv9PveAzPD8tFzKaORwJo3LB38Mm5v/NnszjPn8dG2HCBaUt03HkBU7w5L6h/3t FQwuSHo4YCrgIAKRWsSrJ1v9Qrs9IRLkYTp1A1S4yKmNtwcBsrLnMschoRh7aZNf7sHn XnIs9KHKMfsN4SwsqTm4bM7+HgAP3BKh+1gFHq6C9BS7851M3MECw9XCI9sd8UyCCGTQ WbnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay19si1921476pjb.44.2019.09.04.02.47.59; Wed, 04 Sep 2019 02:48:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729587AbfIDJqt (ORCPT + 99 others); Wed, 4 Sep 2019 05:46:49 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:32812 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725840AbfIDJqt (ORCPT ); Wed, 4 Sep 2019 05:46:49 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8E76FF1821FAB7104FF9; Wed, 4 Sep 2019 17:46:47 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 17:46:38 +0800 From: zhong jiang To: CC: , , Subject: [PATCH v2] iommu/pamu: Use kzfree rather than its implementation Date: Wed, 4 Sep 2019 17:43:44 +0800 Message-ID: <1567590224-23364-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kzfree instead of memset() + kfree(). Signed-off-by: zhong jiang --- drivers/iommu/fsl_pamu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index cde281b..e924368 100644 --- a/drivers/iommu/fsl_pamu.c +++ b/drivers/iommu/fsl_pamu.c @@ -1174,11 +1174,7 @@ static int fsl_pamu_probe(struct platform_device *pdev) if (irq != NO_IRQ) free_irq(irq, data); - if (data) { - memset(data, 0, sizeof(struct pamu_isr_data)); - kfree(data); - } - + kzfree(data); if (pamu_regs) iounmap(pamu_regs); -- 1.7.12.4