From: Benoit Parrot <bparrot@ti.com>
To: zhong jiang <zhongjiang@huawei.com>
Cc: <mchehab@kernel.org>, <linux-media@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: platform: remove redundant null pointer check before of_node_put
Date: Sun, 16 Sep 2018 10:43:38 -0500 [thread overview]
Message-ID: <20180916154338.GE17511@ti.com> (raw)
In-Reply-To: <1537103811-63670-1-git-send-email-zhongjiang@huawei.com>
Zhong,
Thank you for the patch.
zhong jiang <zhongjiang@huawei.com> wrote on Sun [2018-Sep-16 21:16:51 +0800]:
> of_node_put has taken the null pinter check into account. So it is
s/pinter/pointer/
> safe to remove the duplicated check before of_node_put.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
with the above change,
Reviewed-by: Benoit Parrot <bparrot@ti.com>
> ---
> drivers/media/platform/ti-vpe/cal.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
> index cc052b2..5f9d4e0 100644
> --- a/drivers/media/platform/ti-vpe/cal.c
> +++ b/drivers/media/platform/ti-vpe/cal.c
> @@ -1747,14 +1747,10 @@ static int of_cal_create_instance(struct cal_ctx *ctx, int inst)
> }
>
> cleanup_exit:
> - if (remote_ep)
> - of_node_put(remote_ep);
> - if (sensor_node)
> - of_node_put(sensor_node);
> - if (ep_node)
> - of_node_put(ep_node);
> - if (port)
> - of_node_put(port);
> + of_node_put(remote_ep);
> + of_node_put(sensor_node);
> + of_node_put(ep_node);
> + of_node_put(port);
>
> return ret;
> }
> --
> 1.7.12.4
>
prev parent reply other threads:[~2018-09-16 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-16 13:16 zhong jiang
2018-09-16 15:43 ` Benoit Parrot [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=20180916154338.GE17511@ti.com \
--to=bparrot@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=zhongjiang@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