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:	Tue, 9 Feb 2016 09:52:47 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Rafael Wysocki <rjw@...ysocki.net>
Cc:	linaro-kernel@...ts.linaro.org, linux-pm@...r.kernel.org,
	Stephen Boyd <sboyd@...eaurora.org>, nm@...com,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 15/16] cpufreq: dt: drop references to DT node

On 02-02-16, 11:41, Viresh Kumar wrote:
> diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
> +static const char *find_supply_name(struct device *dev)
>  {
> +	struct device_node *np;
>  	struct property *pp;
>  	int cpu = dev->id;
> +	const char *name = NULL;
> +
> +	np = of_node_get(dev->of_node);
> +	if (!np) {
> +		dev_err(dev, "failed to find cpu%d node\n", cpu);
> +		return ERR_PTR(-ENOENT);
> +	}

I have updated that as:

+	np = of_node_get(dev->of_node);
+
+	/* This must be valid for sure */
+	if (WARN_ON(!np))
+		return NULL;

so that we don't have to check return value of find_supply_name() for errors, as
you pointed out in the other patch.

Will keep your RBY tag :)

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ