From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Zheng Yongjun <zhengyongjun3@huawei.com>
Cc: agross@kernel.org, joro@8bytes.org, will@kernel.org,
linux-arm-msm@vger.kernel.org, iommu@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] iommu: msm_iommu: Delete useless kfree code
Date: Mon, 14 Dec 2020 10:21:44 -0600 [thread overview]
Message-ID: <X9eRGFup8LqSejsp@builder.lan> (raw)
In-Reply-To: <20201214134746.5044-1-zhengyongjun3@huawei.com>
On Mon 14 Dec 07:47 CST 2020, Zheng Yongjun wrote:
> The parameter of kfree function is NULL, so kfree code is useless, delete it.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> 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
>
prev parent reply other threads:[~2020-12-14 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 13:47 Zheng Yongjun
2020-12-14 16:21 ` Bjorn Andersson [this message]
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=X9eRGFup8LqSejsp@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.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 \
--cc=zhengyongjun3@huawei.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome