Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6177961ybi; Wed, 31 Jul 2019 09:35:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrs78a5CM8EfDoocCfbe9LFxu8gGr/7QfPo0oqa+WyCJVR93vcskUtcuUF+I9GhdEcO2vO X-Received: by 2002:aa7:9117:: with SMTP id 23mr48610730pfh.206.1564590953512; Wed, 31 Jul 2019 09:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564590953; cv=none; d=google.com; s=arc-20160816; b=PfGtny+fMgayXfat9qUxUFc9YYVmiyTwoibU2GxbgqL86XgrbHsDMSD9mfcPKb3uqG +sOBOJIatxYbnYf3YK/2vdW1Lvmy2NcyLt5MdATQhYquZ9pYqdJOd85zzSYU7J079RvD E074EMwZdyGXLAG6TBIKYeLM9tV1/sWWS6CmYtnLO1ge2uc071jw4Uvip/LF7Zpe4YfB IwqI8ycmforeQa0i1O2oTjlcz5HS1cjgyBFsMGiF2oNZhSAAEVYZLhe3uioqk3H5mRsP Ta9P+zUnL/6ECYDlN+9NmG1eobXAmtvdmh+1sPkQtRQbMCojKsd9+h1OqxptXqf1gHcs Ya6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:importance:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to:from :date; bh=vsqdssxoLg7iBeNDj9knGPs6ySoH0oA9fTal8KVdSQY=; b=sLH3OeHo9vbRfOj7EQlov8fpouxC1YOdeE6ORbfMCpMPFCXGEjK+pZFlrmzDHYlUq3 jr4/Y4o9hneq9z46S7A4e2jI8RBAQzUatNHHQLt7ffij6zDl6vozWcfWkRQdb1JrUtZd EkrI28XwoDVXPAAcnTby0AHpiettk0wRFrtKMOpPXDsnizxXfZYndPJYJMikT3ctbgrr wNigXlSF9kMtcpZEqvMLgarXjGWnRA7+fUm63MHQ6Oyn0i31iwY8cPK/QenBOt6mKp3w 7Zv3nMIba4iZAMNgkSlOsvsy2j4X4oMxvc+AU8vxnFePO+Gz8R5iTnwxvJrHRC4X8tGk rBaw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si380669plt.155.2019.07.31.09.35.37; Wed, 31 Jul 2019 09:35: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729435AbfGaNat (ORCPT + 99 others); Wed, 31 Jul 2019 09:30:49 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:15037 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbfGaNas (ORCPT ); Wed, 31 Jul 2019 09:30:48 -0400 X-RZG-AUTH: ":OWANVUa4dPFUgKR/3dpvnYP0Np73amq+g13rqGzmt2bYDnKIKaws6YXTsc4=" X-RZG-CLASS-ID: mo00 Received: from oxapp06-03.back.ox.d0m.de by smtp-ox.front (RZmta 44.24 AUTH) with ESMTPSA id h0a328v6VDUiZTi (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Wed, 31 Jul 2019 15:30:44 +0200 (CEST) Date: Wed, 31 Jul 2019 15:30:44 +0200 (CEST) From: Ulrich Hecht To: Geert Uytterhoeven , Zhang Rui , Eduardo Valentin , Daniel Lezcano Cc: Marek Vasut , linux-pm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <51684361.319230.1564579844450@webmail.strato.com> In-Reply-To: <20190731125053.14750-1-geert+renesas@glider.be> References: <20190731125053.14750-1-geert+renesas@glider.be> Subject: Re: [PATCH] thermal: rcar_gen3_thermal: Use devm_add_action_or_reset() helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.10.1-Rev16 X-Originating-IP: 85.212.153.30 X-Originating-Client: open-xchange-appsuite Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On July 31, 2019 at 2:50 PM Geert Uytterhoeven wrote: > > > Use the devm_add_action_or_reset() helper instead of open-coding the > same operations. > > Signed-off-by: Geert Uytterhoeven > --- > drivers/thermal/rcar_gen3_thermal.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c > index a56463308694e937..2db7e7f8baf939fd 100644 > --- a/drivers/thermal/rcar_gen3_thermal.c > +++ b/drivers/thermal/rcar_gen3_thermal.c > @@ -443,11 +443,10 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) > if (ret) > goto error_unregister; > > - ret = devm_add_action(dev, rcar_gen3_hwmon_action, zone); > - if (ret) { > - rcar_gen3_hwmon_action(zone); > + ret = devm_add_action_or_reset(dev, rcar_gen3_hwmon_action, > + zone); > + if (ret) > goto error_unregister; > - } > > ret = of_thermal_get_ntrips(tsc->zone); > if (ret < 0) > -- > 2.17.1 > Reviewed-by: Ulrich Hecht CU Uli