[PATCH v1 3/3] thermal: zx2967: add thermal driver for ZTE's zx2967 family
Shawn Guo
shawnguo at kernel.org
Mon Jan 9 00:42:56 PST 2017
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;
> >+}
More information about the linux-arm-kernel
mailing list