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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 31 Mar 2016 14:10:58 +0200
From:	Sylwester Nawrocki <s.nawrocki@...sung.com>
To:	Chanwoo Choi <cw00.choi@...sung.com>
Cc:	myungjoo.ham@...sung.com, kyungmin.park@...sung.com,
	k.kozlowski@...sung.com, kgene@...nel.org, rjw@...ysocki.net,
	robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
	linux@....linux.org.uk, linux.amoon@...il.com,
	m.reichl@...etechno.de, tjakobi@...h.uni-bielefeld.de,
	inki.dae@...sung.com, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v7 01/20] PM / devfreq: exynos: Add generic exynos bus
 frequency driver

On 03/31/2016 11:05 AM, Chanwoo Choi wrote:

> +static int exynos_bus_target(struct device *dev, unsigned long *freq, u32 flags)
> +{

> +	new_opp = devfreq_recommended_opp(dev, freq, flags);
> +	if (IS_ERR_OR_NULL(new_opp)) {
> +		dev_err(dev, "failed to get recommed opp instance\n");

s/recommed/recommended/

> +		rcu_read_unlock();
> +		return PTR_ERR(new_opp);
> +	}

> +}

> +static int exynos_bus_probe(struct platform_device *pdev)
> +{

> +	bus->devfreq = devm_devfreq_add_device(dev, profile, "simple_ondemand",
> +						ondemand_data);
> +	if (IS_ERR_OR_NULL(bus->devfreq)) {
> +		dev_err(dev, "failed to add devfreq device\n");
> +		return  PTR_ERR(bus->devfreq);
> +	}

> +}

You should use IS_ERR() instead of IS_ERR_OR_NULL(), since functions
of which the return value is being tested return only ERR_PTR() values.
IS_ERR_OR_NULL() suggest NULL values are possible and then constructs
like
	if (IS_ERR_OR_NULL(result))
		return PTR_ERR(result);

are not correct anyway.

-- 
Regards,
Sylwester

Powered by blists - more mailing lists