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]
Date:   Thu, 26 Mar 2020 14:17:05 +0000
From:   Anson Huang <anson.huang@....com>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>,
        "rui.zhang@...el.com" <rui.zhang@...el.com>,
        "amit.kucheria@...durent.com" <amit.kucheria@...durent.com>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH] thermal: imx: Add missing of_node_put()

Hi, Daniel

> Subject: Re: [PATCH] thermal: imx: Add missing of_node_put()
> 
> On 26/03/2020 06:27, Anson Huang wrote:
> > After finishing using cpu node got from of_get_cpu_node(),
> > of_node_put() needs to be called.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@....com> ---
> > drivers/thermal/imx_thermal.c | 10 +++++++--- 1 file changed, 7
> > insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/thermal/imx_thermal.c
> > b/drivers/thermal/imx_thermal.c index e761c9b..f7b970d 100644 ---
> > a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c
> @@
> > -649,7 +649,7 @@ MODULE_DEVICE_TABLE(of, of_imx_thermal_match);
> static
> > int imx_thermal_register_legacy_cooling(struct imx_thermal_data *data)
> > { struct device_node *np; -	int ret; +	int ret = 0;
> >
> > data->policy = cpufreq_cpu_get(0); if (!data->policy) { @@ -664,11
> > +664,15 @@ static int imx_thermal_register_legacy_cooling(struct
> > imx_thermal_data *data) if (IS_ERR(data->cdev)) { ret =
> > PTR_ERR(data->cdev); cpufreq_cpu_put(data->policy); -
> 	return
> > ret; +			goto put_node; } }
> >
> > -	return 0; +put_node: +	if (np) +		of_node_put(np);
> 
> of_node_put() is already checking if 'np' is NULL.

OK, I will remove the checking of if 'np' is NULL.

Thanks,
Anson

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ