From: Zheng Yongjun <zhengyongjun3@huawei.com> To: <agross@kernel.org>, <bjorn.andersson@linaro.org>, <joro@8bytes.org>, <will@kernel.org>, <linux-arm-msm@vger.kernel.org>, <iommu@lists.linux-foundation.org>, <linux-kernel@vger.kernel.org> Cc: Zheng Yongjun <zhengyongjun3@huawei.com> Subject: [PATCH -next] iommu: msm_iommu: Delete useless kfree code Date: Mon, 14 Dec 2020 21:47:46 +0800 [thread overview] Message-ID: <20201214134746.5044-1-zhengyongjun3@huawei.com> (raw) The parameter of kfree function is NULL, so kfree code is useless, delete it. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> --- drivers/iommu/msm_iommu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 3615cd6241c4..1286674a1322 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c @@ -319,7 +319,7 @@ static struct iommu_domain *msm_iommu_domain_alloc(unsigned type) priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) - goto fail_nomem; + return NULL; INIT_LIST_HEAD(&priv->list_attached); @@ -328,10 +328,6 @@ static struct iommu_domain *msm_iommu_domain_alloc(unsigned type) priv->domain.geometry.force_aperture = true; return &priv->domain; - -fail_nomem: - kfree(priv); - return NULL; } static void msm_iommu_domain_free(struct iommu_domain *domain) -- 2.22.0
WARNING: multiple messages have this Message-ID (diff)
From: Zheng Yongjun <zhengyongjun3@huawei.com> To: <agross@kernel.org>, <bjorn.andersson@linaro.org>, <joro@8bytes.org>, <will@kernel.org>, <linux-arm-msm@vger.kernel.org>, <iommu@lists.linux-foundation.org>, <linux-kernel@vger.kernel.org> Cc: Zheng Yongjun <zhengyongjun3@huawei.com> Subject: [PATCH -next] iommu: msm_iommu: Delete useless kfree code Date: Mon, 14 Dec 2020 21:47:46 +0800 [thread overview] Message-ID: <20201214134746.5044-1-zhengyongjun3@huawei.com> (raw) The parameter of kfree function is NULL, so kfree code is useless, delete it. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> --- drivers/iommu/msm_iommu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 3615cd6241c4..1286674a1322 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c @@ -319,7 +319,7 @@ static struct iommu_domain *msm_iommu_domain_alloc(unsigned type) priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) - goto fail_nomem; + return NULL; INIT_LIST_HEAD(&priv->list_attached); @@ -328,10 +328,6 @@ static struct iommu_domain *msm_iommu_domain_alloc(unsigned type) priv->domain.geometry.force_aperture = true; return &priv->domain; - -fail_nomem: - kfree(priv); - return NULL; } static void msm_iommu_domain_free(struct iommu_domain *domain) -- 2.22.0 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
next reply other threads:[~2020-12-14 13:48 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-14 13:47 Zheng Yongjun [this message] 2020-12-14 13:47 ` [PATCH -next] iommu: msm_iommu: Delete useless kfree code Zheng Yongjun 2020-12-14 16:21 ` Bjorn Andersson 2020-12-14 16:21 ` Bjorn Andersson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201214134746.5044-1-zhengyongjun3@huawei.com \ --to=zhengyongjun3@huawei.com \ --cc=agross@kernel.org \ --cc=bjorn.andersson@linaro.org \ --cc=iommu@lists.linux-foundation.org \ --cc=joro@8bytes.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.