Hi Anson, On Mon, Oct 28, 2019 at 3:07 AM Anson Huang <Anson.Huang@xxxxxxx> 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);