mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Wen Yang <wen.yang99@zte.com.cn>,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Cc: Hyun Kwon <hyun.kwon@xilinx.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Michal Simek <michal.simek@xilinx.com>,
	Patrice Chotard <patrice.chotard@st.com>,
	Yi Wang <wang.yi59@zte.com.cn>
Subject: Re: [PATCH 1/3] media: xilinx: fix leaked of_node references
Date: Fri, 28 Jun 2019 14:45:31 +0200	[thread overview]
Message-ID: <e01175e4-1e4d-e9d7-5e5b-ec6e2f7b5065@web.de> (raw)
In-Reply-To: <1561690876-20977-2-git-send-email-wen.yang99@zte.com.cn>

> +++ b/drivers/media/platform/xilinx/xilinx-tpg.c
> @@ -713,10 +713,13 @@  static int xtpg_parse_of(struct xtpg_device *xtpg)
>  	struct device_node *port;
>  	unsigned int nports = 0;
>  	bool has_endpoint = false;
> +	int ret = 0;
>
>  	ports = of_get_child_by_name(node, "ports");
> -	if (ports == NULL)
> +	if (ports == NULL) {

The script “checkpatch.pl” can point information out like “Comparison to NULL
could be written …”.
Thus fix the affected source code place.

+	if (!ports) {


>  		ports = node;
> +		of_node_get(ports);
> +	}
>
>  	for_each_child_of_node(ports, port) {
>  		const struct xvip_video_format *format;


Regards,
Markus

  reply	other threads:[~2019-06-28 12:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28  3:01 [PATCH 0/3] fix leaked of_node references in drivers/media Wen Yang
2019-06-28  3:01 ` [PATCH 1/3] media: xilinx: fix leaked of_node references Wen Yang
2019-06-28 12:45   ` Markus Elfring [this message]
2019-06-28  3:01 ` [PATCH 2/3] media: exynos4-is: " Wen Yang
2019-06-28  3:01 ` [PATCH 3/3] media: ti-vpe: " Wen Yang

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=e01175e4-1e4d-e9d7-5e5b-ec6e2f7b5065@web.de \
    --to=markus.elfring@web.de \
    --cc=hyun.kwon@xilinx.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=patrice.chotard@st.com \
    --cc=wang.yi59@zte.com.cn \
    --cc=wen.yang99@zte.com.cn \
    /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

all inboxes | Powered by JetHome®