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]
Message-ID: <376717d4-3c89-2b19-ca38-c75e30c8f772@lechnology.com>
Date:   Mon, 26 Nov 2018 15:18:36 -0600
From:   David Lechner <david@...hnology.com>
To:     Roger Quadros <rogerq@...com>, tony@...mide.com
Cc:     robh+dt@...nel.org, bcousson@...libre.com, ssantosh@...nel.org,
        ohad@...ery.com, bjorn.andersson@...aro.org, s-anna@...com,
        nsekhar@...com, t-kristo@...com, nsaulnier@...com, jreeder@...com,
        m-karicheri2@...com, woods.technical@...il.com,
        linux-omap@...r.kernel.org, linux-remoteproc@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 11/17] soc: ti: pruss: add pruss_get()/put() API

On 11/22/18 5:39 AM, Roger Quadros wrote:

> +	pruss = platform_get_drvdata(ppdev);
> +	if (pruss)
> +		get_device(pruss->dev);
> +
> +	return pruss ? pruss : ERR_PTR(-ENODEV);
> +}

This might be a bit easier to follow if we handle the error
path first:

	if (!pruss)
		return ERR_PTR(-ENODEV);

	get_device(pruss->dev);

	return pruss;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ