Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5748193rwi; Tue, 18 Oct 2022 03:42:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KE4RgT5JWW9CD+JMqjx0NdhqAm9Egqy1y4o3I2KZ0kNXP9m+ChjA1KICc/28ndqK4mQ3I X-Received: by 2002:a17:907:b0b:b0:78d:8877:9f9e with SMTP id h11-20020a1709070b0b00b0078d88779f9emr1799713ejl.693.1666089760513; Tue, 18 Oct 2022 03:42:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666089760; cv=none; d=google.com; s=arc-20160816; b=oKtft5+tZHc/5oQkG1K9c1XWAztUzqlU0iUSKDaoyCZH6+271s8VzFIg33/zBImfLR Uo0iS8xgoU87JBKrHeLN8JcMamkFPsNFISVQStYiI5BLrD94mPNqNDd3lN8yPtV6TyZm NO8nzRpiELnMv8CHK2dYCM7RtNQ2nv978ToK/KvTfDxmfBGDUoLiq11cJyeJCfQ/Jlyq Kc5WbnUf0Ob2WUv2JWRlHoY8cKZc50h4hJR4FsVxSmcX+1/1y89rjc4mQ9n+E3Wuy4lH VBdBWWI0I075INKuDfRcZ4ZpPk9d7K1OtLAObJvE1TX608RqJsXlVX2T3Ya6dVG2PpDq GojA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=urMCChgCu1u+56jJGaeezcXuErkz0/nAyptCtTcKAcc=; b=YCxTVcwf5+DpmqnIwcUXWvMQNhvkXH0eq7GvbeLO0ildH8wsUQjqc+DcB0EKeubbB9 dijsyIU0wGjrGMHnGOZ/EXgDXBaJbu3f/t50tQgVcFpLwNvd09NvQxX2tIQ1TvggmI4U zSnX5UwNUpvwANyL15XSiiVLrdl+vz/Bk6ohxBrMJJKKaXS/qN1GHHuw03biTSvLV6kV xl3pbglmZ97uBz7w+CcgJTTBJwoyYDYa3X4ZmhRn8Brqh7ufNSbMpP1ByCtibEOGIX3u EcY7mjsok8JW2uz+1fS51JTPD00yYW714rIqO+wexFQ9ktRT2YuLuWQChMN1KRth3ff8 VbjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=EW+G5ucp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du17-20020a17090772d100b007341ad4b028si11140707ejc.642.2022.10.18.03.42.14; Tue, 18 Oct 2022 03:42:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=EW+G5ucp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229845AbiJRKeR (ORCPT + 99 others); Tue, 18 Oct 2022 06:34:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbiJRKdw (ORCPT ); Tue, 18 Oct 2022 06:33:52 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5412EB4483; Tue, 18 Oct 2022 03:33:51 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A4F285C00CD; Tue, 18 Oct 2022 06:33:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 18 Oct 2022 06:33:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1666089230; x=1666175630; bh=urMCChgCu1u+56jJGaeezcXuErkz 0/nAyptCtTcKAcc=; b=EW+G5ucp3HiQ0siiSTUhTA4p8V2d8zcFZpKXOP3CzkRr A04oWt1tAIiyOkHSazLT/ot/liLe4rhjuQUsnjQduyUwOhyHq6wSDRPJDg7F6f2D AQIPeqRQQFKydjwF6qfPe5Hcd6TdGfuwXL4rOcxdYckg8S0eShQgg3UhT1IFuamZ UieemhI47uDsk5pAGY7gB0s7ffrDin53lWz6/1WOXXFckL7SmJpQ166PALbIVjE/ TqwQ21BEPZ/SGTfJWIdBR35ugKolRvGm7XtPwh5+34JLZQafEeUMIWnOF0YyAnlS 88khAbGuyjmbdF1yCadsxvEYJCgN8bmnkKG4gLbRLQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeelvdcutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfutghh ihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtthgvrh hnpedvudefveekheeugeeftddvveefgfduieefudeifefgleekheegleegjeejgeeghfen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiughosh gthhesihguohhstghhrdhorhhg X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Oct 2022 06:33:49 -0400 (EDT) Date: Tue, 18 Oct 2022 13:33:45 +0300 From: Ido Schimmel To: Daniel Lezcano Cc: daniel.lezcano@linaro.org, rafael@kernel.org, rui.zhang@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, abailon@baylibre.com, lukasz.luba@arm.com, broonie@kernel.org, damien.lemoal@opensource.wdc.com, heiko@sntech.de, hayashi.kunihiko@socionext.com, mhiramat@kernel.org, talel@amazon.com, thierry.reding@gmail.com, digetx@gmail.com, jonathanh@nvidia.com, anarsoul@gmail.com, tiny.windzz@gmail.com, baolin.wang7@gmail.com, f.fainelli@gmail.com, bjorn.andersson@linaro.org, mcoquelin.stm32@gmail.com, glaroque@baylibre.com, miquel.raynal@bootlin.com, shawnguo@kernel.org, niklas.soderlund@ragnatech.se, matthias.bgg@gmail.com, j-keerthy@ti.com, Amit Kucheria Subject: Re: [PATCH v5 01/33] thermal/of: Rework the thermal device tree initialization Message-ID: References: <20220804224349.1926752-1-daniel.lezcano@linexp.org> <20220804224349.1926752-2-daniel.lezcano@linexp.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 18, 2022 at 01:29:04PM +0300, Ido Schimmel wrote: > diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c > index d4b6335ace15..43d55c29a29a 100644 > --- a/drivers/thermal/thermal_of.c > +++ b/drivers/thermal/thermal_of.c > @@ -604,13 +604,15 @@ struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, > if (IS_ERR(np)) { > if (PTR_ERR(np) != -ENODEV) > pr_err("Failed to find thermal zone for %pOFn id=%d\n", sensor, id); > - return ERR_CAST(np); > + ret = PTR_ERR(np); > + goto out_kfree_of_ops; > } > > trips = thermal_of_trips_init(np, &ntrips); > if (IS_ERR(trips)) { > pr_err("Failed to find trip points for %pOFn id=%d\n", sensor, id); > - return ERR_CAST(trips); > + ret = PTR_ERR(np); Sorry, should be: ret = PTR_ERR(trips); > + goto out_kfree_of_ops; > } > > ret = thermal_of_monitor_init(np, &delay, &pdelay); > @@ -659,6 +661,8 @@ struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, > kfree(tzp); > out_kfree_trips: > kfree(trips); > +out_kfree_of_ops: > + kfree(of_ops); > > return ERR_PTR(ret); > }