Messages in this thread | | | From | Fabio Estevam <> | Date | Tue, 29 Oct 2019 07:26:25 -0300 | Subject | Re: [PATCH RESEND 2/4] thermal: imx8mm: Add support for i.MX8MM thermal monitoring unit |
| |
Hi Anson,
On Mon, Oct 28, 2019 at 3:07 AM Anson Huang <Anson.Huang@nxp.com> wrote:
> + ret = clk_prepare_enable(tmu->clk); > + if (ret) { > + dev_err(&pdev->dev, "failed to enable tmu clock: %d\n", ret); > + return ret; > + } > + > + tmu->tzd = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, > + tmu, &tmu_tz_ops); > + if (IS_ERR(tmu->tzd)) { > + dev_err(&pdev->dev, > + "failed to register thermal zone sensor: %d\n", ret);
You should disable the tmu clock in the error path.
> + return PTR_ERR(tmu->tzd);
| |