lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e01175e4-1e4d-e9d7-5e5b-ec6e2f7b5065@web.de>
Date:   Fri, 28 Jun 2019 14:45:31 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Wen Yang <wen.yang99@....com.cn>,
        linux-arm-kernel@...ts.infradead.org, linux-media@...r.kernel.org
Cc:     Hyun Kwon <hyun.kwon@...inx.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        linux-kernel@...r.kernel.org,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Michal Simek <michal.simek@...inx.com>,
        Patrice Chotard <patrice.chotard@...com>,
        Yi Wang <wang.yi59@....com.cn>
Subject: Re: [PATCH 1/3] media: xilinx: fix leaked of_node references

> +++ 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ