Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4237443ybg; Tue, 29 Oct 2019 04:17:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSSZ//mYyGq5L75RSfv19U7M/UxWiGZ+8MRFKWg7LreIUBLht0ccOQoUlisKcu7OHu0TYl X-Received: by 2002:a17:906:1c48:: with SMTP id l8mr2617910ejg.203.1572347873379; Tue, 29 Oct 2019 04:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572347873; cv=none; d=google.com; s=arc-20160816; b=aS+eobnzznIOoYEnw66ztXlpFK6atQZgV64qTwQMYPKPzgwJxPXkekXuy3oUAk39K2 g1u0771xLbVuZ2SPGsJay8LijYMYbmGc3au9z0iEOLO8qpSJRuNcdRujFDQ8J2X/wHSB q28TNHqC+z5uPZJ4fcoJuLcW4fn0kQb5SvkKJPMkVKRKABx1HAE8TKVuyYdVbEvs5zs5 /AcoSXM6KZXsJzVfxM3TFmqMEfHfH3tU5z9gNoFmQmcB/Vi0lhbTvQYhqQaDPBjKSQnu KgBWOVwA7IcOeZwna/hfPGI4d9id98Yopl45NMRpRmQ1OFcFONBHelekttRyturLHryo gXCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XXJ4yTre3lT2Hw451DHGum9ZE/PvKC28ALSpkKaZpzQ=; b=lA8FJI0U3M6X67+uzisGHaAo2RTcv1CFuSYhMa6G8mMAPg1lEasBoxdaxABoblEa+Z ndGcj4r6oLwotTxS7d0gVAM9/uU7O0FHk7+RADFMzFZWLpKGPxhCt5Fx1k1xRG3O/3wE JN4Q8W9wsL1KcAQGTPAm5v0hqVmpDsWX2JHi0lIVqxvkZjpKOm0/h2nnjWyxpQi0N10W +smWcwPoiQlNnj7QuVXGj3dXVsF/k99KmWpNQ9DaBlT65R+eGePTsc/+xodQgpan5sWu uNawE11B62VLQO0Suug6SZneBVhO+JwZJEDXdYY4yPJleLEo+pftw0Pc5BAx1oFOBlkJ QCDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PVtNfW4X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d34si8898044eda.268.2019.10.29.04.17.30; Tue, 29 Oct 2019 04:17:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PVtNfW4X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730321AbfJ2K02 (ORCPT + 99 others); Tue, 29 Oct 2019 06:26:28 -0400 Received: from mail-lj1-f175.google.com ([209.85.208.175]:45768 "EHLO mail-lj1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727875AbfJ2K00 (ORCPT ); Tue, 29 Oct 2019 06:26:26 -0400 Received: by mail-lj1-f175.google.com with SMTP id q64so14594167ljb.12; Tue, 29 Oct 2019 03:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XXJ4yTre3lT2Hw451DHGum9ZE/PvKC28ALSpkKaZpzQ=; b=PVtNfW4XijiPFaMmyDWiKYevJ8Rnb+AuMPalMz+XGKSUUDzZGmB19dF+OPd+Cf7t8x AM5X/2XYgMyjwp1lINKaoqB70YPe+4nr9+G+nSi3wK+NxVo1uxLjvDxnqy3yKeBM3Yeb ietayrCkXZH7jE7r/YWqQ2Sb1zpm4jLfOWjwK4Y735P+vNEmyMgeSeT53ClgCeWNojIp m6zx9kwbh1Un8/jIDXYwUJnRnERjsZ5+G1SJRdPGNXWjRIIXM5aLubj8jIm/u9iRUcDW qL6IjUtTSOPdNq8laPS5fNErXTA8OZWpjNE8PQSwFIYEJhNawPFo18szPVc5JR6Bh3Dx slfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XXJ4yTre3lT2Hw451DHGum9ZE/PvKC28ALSpkKaZpzQ=; b=ddiPlUOQwXODtON3W8ExhpOWSAvenqmgkaBLRDitcoTkyTD96BoX772uiGE0TZV1ru 3xyiiMVgubAQeDoe6v2uT1S95eK81XPB7ptTa5b+200KSMtsIupElRC0gG+TVbG04tAA TEMPFoEzPpu8I3683FHi57DT1RHP5kgSjSQyuHViMq+itFfY1fvZ0xeMZXc48sl84ozw AIU1EtEUqPDtRf5Q0437mZvaqQLUlkDgCMD6tnsJfr/yBWvqKEsdri+lfwQXCcYtmac4 Zgu8porYCWSf31QNnBqkVxWmFrAYQFQCFAOS+8lLPSDoG7HpdPqM16lkDTBqS3mzz1sP ++Uw== X-Gm-Message-State: APjAAAV63r3GSQ2yRGyLIrRB0mB/4fo+Qcmx67YBXynGgzr+8Vd2j7ys mWZoTylcpOX6Sf+pNqf8Q6ONvOx510FAcU1UIos= X-Received: by 2002:a2e:819a:: with SMTP id e26mr2054650ljg.26.1572344784090; Tue, 29 Oct 2019 03:26:24 -0700 (PDT) MIME-Version: 1.0 References: <1572242618-18806-1-git-send-email-Anson.Huang@nxp.com> <1572242618-18806-2-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1572242618-18806-2-git-send-email-Anson.Huang@nxp.com> From: Fabio Estevam Date: Tue, 29 Oct 2019 07:26:25 -0300 Message-ID: Subject: Re: [PATCH RESEND 2/4] thermal: imx8mm: Add support for i.MX8MM thermal monitoring unit To: Anson Huang Cc: "rui.zhang" , Eduardo Valentin , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Sascha Hauer , Catalin Marinas , will@kernel.org, Leonard Crestez , Abel Vesa , Ping Bai , Daniel Baluta , Li Jun , Bjorn Andersson , Olof Johansson , mripard@kernel.org, Vinod , Jagan Teki , Dinh Nguyen , marcin.juszkiewicz@linaro.org, linux-pm@vger.kernel.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel , NXP Linux Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anson, On Mon, Oct 28, 2019 at 3:07 AM Anson Huang 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);