Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1269321ybg; Thu, 4 Jun 2020 05:39:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzuq22nL51T8QfCCRDJBEJlbgm4W8yR5gepuyVxow5JzuxG3UbPoCeIfPPvISatQGknGMS X-Received: by 2002:a17:906:dbda:: with SMTP id yc26mr3616184ejb.82.1591274377460; Thu, 04 Jun 2020 05:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591274377; cv=none; d=google.com; s=arc-20160816; b=Iv9HWGw2uBX6cd38j8u/1QENqgosq3HlzYgt0t5di1o7EySfurkGHLY7YpVitq/m0s Tlvzd46R+K3cL5f9VfEUoNFnI5oY+wSjZbR/41tD14OIZuLdmVRXld9aPSNAHGzl1qWm KEc4Nr4sjNmdRG7J5/Cn8zBba3gvqWWtomAQfql4Bts/CHfNtE25PAs0sqxE/uQKWLlp 6f4CDrbFrKNgbwB2l8pJJYuMyDluyB8v8zFMay3DpcCiaKuVA/lEgD8UkqH2/7Y3z3vO +JER31W4E0No1QPS8SM4TZIJ24J0ZBBGBoiKEu482mtYMT5X7ew3FRO7uwwmzzRsJJiB JUGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=187fRi3wAGXdsWJGdJdYxiJeP7RT5ffi4VOBDvE3vkA=; b=ccK8CY3ByKhqkpafsj4U5k9e+zV+8xHga1wGij5qZQb+Fa8WfmsOGQFXCzYOSpH0Xy av0X8eq5llVdl1FqOEKYA6yTJH9gWJvhst5TIpCBIePr4EcWPDlC5WJpoJk8ufhp23Jh se2ZnaDN3WTXF7l8RJMyLs7Mt67dTNUSQbUX2X4/rqEKobkGGj2c026VZMeCKE/FgwSl y/WRu8peH6OQtrDOLmtNZP72VesFV6gbJVVOxZ3WAm3YLIwXbX7hIrGhzeGupd+D1GFm ZWeZK7UTvp4EYqNLC0+axuq322eHC03yN1QGFQIwEO6O5NVvDxOX5NIAQkBirq/NQVf0 29HQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g18si1414440ejr.498.2020.06.04.05.39.13; Thu, 04 Jun 2020 05:39:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726311AbgFDMhS (ORCPT + 99 others); Thu, 4 Jun 2020 08:37:18 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34131 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726112AbgFDMhS (ORCPT ); Thu, 4 Jun 2020 08:37:18 -0400 Received: by mail-lj1-f196.google.com with SMTP id b6so7090635ljj.1 for ; Thu, 04 Jun 2020 05:37:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=187fRi3wAGXdsWJGdJdYxiJeP7RT5ffi4VOBDvE3vkA=; b=p5rYNXaVmrpdqAY4WcBUinTVzDBUwEKzCinjbnG8lFGB446iLTePVzCaAnZTznj8JW 9SOHHRGsAmG4L1gDu8oKbxw03u2VJ6BXAEyeD0sZLUEjC7MOtTFnR1Ybck3W3/Qm8Guw FI8mL8UPoenyBUNPotpsVWdGwsl0Y252c6DXvmSa95Z1gb72aK6Op1z/nrr4UjdBx2Vf II5RLz+B+XwCqfQMhqerxgVR4Ot4ZeoNJO3c1waoJc0KijKP1c/wuefdOMMXrGoqTYY/ y3DLUnaWHkNWHORG572JFiGqHdKotiKQvOYJ5y5MDYSdG0tYgGz8481zF7m0NgORrG0n yLhg== X-Gm-Message-State: AOAM531IG7Aku7BW/nlAtjdQJVQdPvvdmBeoq1yFG7HnuKoG9MzJM+SH QIKYGgN4oNbMOeDHEgIhM4uwxUeM X-Received: by 2002:a2e:9b4b:: with SMTP id o11mr2030133ljj.407.1591274236199; Thu, 04 Jun 2020 05:37:16 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id 15sm1167175ljw.46.2020.06.04.05.37.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 05:37:15 -0700 (PDT) From: Denis Efremov To: Joerg Roedel Cc: Denis Efremov , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH] iommu: fsl_pamu: use kzfree() in fsl_pamu_probe() Date: Thu, 4 Jun 2020 15:37:09 +0300 Message-Id: <20200604123709.96561-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kzfree() instead of opencoded memset with 0 followed by kfree(). Null check is not required since kzfree() checks for NULL internally. Signed-off-by: Denis Efremov --- drivers/iommu/fsl_pamu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index cde281b97afa..099a11a35fb9 100644 --- a/drivers/iommu/fsl_pamu.c +++ b/drivers/iommu/fsl_pamu.c @@ -1174,10 +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); -- 2.26.2