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