[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170109084254.GL20956@dragon>
Date: Mon, 9 Jan 2017 16:42:56 +0800
From: Shawn Guo <shawnguo@...nel.org>
To: Jun Nie <jun.nie@...aro.org>
Cc: Baoyou Xie <baoyou.xie@...aro.org>, rui.zhang@...el.com,
edubezval@...il.com, robh+dt@...nel.org, mark.rutland@....com,
gregkh@...uxfoundation.org, davem@...emloft.net,
geert+renesas@...der.be, akpm@...ux-foundation.org,
mchehab@...nel.org, linux@...ck-us.net, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, xie.baoyou@....com.cn,
chen.chaokai@....com.cn, wang.qiang01@....com.cn
Subject: Re: [PATCH v1 3/3] thermal: zx2967: add thermal driver for ZTE's
zx2967 family
On Mon, Jan 09, 2017 at 11:00:38AM +0800, Jun Nie wrote:
> >+static int zx2967_thermal_resume(struct device *dev)
> >+{
> >+ struct platform_device *pdev = to_platform_device(dev);
> >+ struct zx2967_thermal_priv *priv = platform_get_drvdata(pdev);
> >+ int error;
> >+
> >+ error = clk_prepare_enable(priv->clk_gate);
> >+ if (error)
> Use IS_ERR(ret) to check error.
No. IS_ERR() checks on pointer, while clk_prepare_enable() returns
integer.
Shawn
> >+ return error;
> >+
> >+ error = clk_prepare_enable(priv->pclk);
> >+ if (error)
> Ditto.
> >+ return error;
> >+
> >+ dev_info(dev, "resumed\n");
> >+
> >+ return 0;
> >+}
Powered by blists - more mailing lists