Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6440714ybi; Wed, 31 Jul 2019 14:33:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdNavOK3eSJDTF8EyvSZXBXb5G+uqoEmuTwrwYa/MC0+n09GYNA3lNWnx5FYcleX6yfWdE X-Received: by 2002:a17:90a:de02:: with SMTP id m2mr4923341pjv.18.1564608796282; Wed, 31 Jul 2019 14:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564608796; cv=none; d=google.com; s=arc-20160816; b=FAYe82o5LAAqqJoYYW9EgKsGl8eP/nYa7SLW7Q5AFIxoNYfmiyIgdX4TuOi7Vyg6Iu 7hY8czmYQMLPnjpSwrDYsUaS2bja40jNg7v5gqbn/DGDirrsXrm/I+IdehTiGsdL2uWz fRbEmvkIZ/Nw1S1JUgpDmV9iPmWH+ltve/DvNsfgUqGqQ+NfAMVNMApxsSrh0MH8WC9Q KA1O0Vu+Ym89Fsqe/Ah+RPmCHbO1lE06E5RmeRM+nqYTMlaDF2y2rzW0VFboev4Bt3Jm I1P+4Tof6jkYolHJtD8Y5ifQPofBp1RL7uPHp/yo+j+YqWZVNXP6vZvhv2lk+5E7lL81 5lHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=S8iymda7xPMQ4926S35iyef8N5nHE8NRBoOVEkW+KiU=; b=VOoggOfraqPPFEFs0x1Ii08vCM8zoTSPmF7dyA3kPjJqyQuPUBDj1Y2mBSqaSMLS+Z hicfsQN6XQpLTE+8zzzS9CnaRYNQUQufgV43dqYYhVzPEaikuh9DhX221GIIJoo8rrRk Qh2ZnXIeJTGLECiq9qDe2YaHEzQDs+8OlZf1qaTml+uKr8Tad/EtFLx7efecMUOS/9pw fUwelRcWkln4qbaHQPrN+JHcDrMJG22zDHPVuc2uYqcoqV9gBy6G1C3fh347TSC7b3tO dfM7Nss3zuTL99oeZm0rrLB4kaUm1MJmNq8asT8C1NS7cn1qPKBdNWVTduIb+gm9RgtM Lb+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ragnatech-se.20150623.gappssmtp.com header.s=20150623 header.b=MOyunKS4; 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 br15si2259824pjb.43.2019.07.31.14.33.01; Wed, 31 Jul 2019 14:33:16 -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=@ragnatech-se.20150623.gappssmtp.com header.s=20150623 header.b=MOyunKS4; 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 S1730443AbfGaSoG (ORCPT + 99 others); Wed, 31 Jul 2019 14:44:06 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42806 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730428AbfGaSoG (ORCPT ); Wed, 31 Jul 2019 14:44:06 -0400 Received: by mail-lj1-f194.google.com with SMTP id t28so66648738lje.9 for ; Wed, 31 Jul 2019 11:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech-se.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=S8iymda7xPMQ4926S35iyef8N5nHE8NRBoOVEkW+KiU=; b=MOyunKS4ipxqo9LGPAcFwtqEOm8UGWkGuO7rQLbHcexMrHl3rDvDcdiO4C/Jo5RKI9 J4nc/lBbKWNLaF+MFCp8pJkWbpFpwXpaEDPUs6xCyXwZXrK3wQWniYdrY/NSf/UAIc1f WJSkyj+AFRo5ypChNb3XX+Z8/xrdfdVsppMWYKlwrTj4xdMOfLTMNvsD2d8OGKiS27ny jzhap1hRgLGYCamoJYJO9sJOtpJUOFij5jc9V5FtuEmYOwwfVdBmEVjZXIJm94pWEJsq 4xrheUp7DpybEuiXIh+NOJuyQ5KOK4NlU2zTmGmT3n6FzDJTiDO2LlI7kUsxMYERq126 mb5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=S8iymda7xPMQ4926S35iyef8N5nHE8NRBoOVEkW+KiU=; b=AnEqvfpfU1T7CzZTU5gv4eRN0mHsNDZtq1GZG0b0qi+BHGieu1rl+sD1sjPnNgiWoz lnu1QoCAFFACe1snnSqQNtKR2PSp4CXtMLnnueB0GLfTv5SSEN/qh0QNMuuEd5ISrajl kRTkzpQsRWDKbam0//PxV98hXuHr0DCFgYIFv08IcjqWvATBhUAP7eYXnjNGH5cr7+Xt MZ/f87ZMQ6UodSMRL/Lp4Wpd7ukxL86q3p3N0jD9JQE1lfUXaqWNezg7xmSWOZOQim9t 5Qb80Te3sOpN0MLXzJ/aPCCdS4B/gE31L2ASUtTmMpKtebE6GPT4Wj2RCZSfinO7oKp/ E2gg== X-Gm-Message-State: APjAAAUvHIqcB5e186JPL2phjJ+DceMf59cGvhN0H5HRcXjIOGT5MP8t W3T98yEEHhKTSFI3/Daa7j7s1Chi X-Received: by 2002:a2e:994:: with SMTP id 142mr64164643ljj.130.1564598643913; Wed, 31 Jul 2019 11:44:03 -0700 (PDT) Received: from localhost (customer-145-14-112-32.stosn.net. [145.14.112.32]) by smtp.gmail.com with ESMTPSA id f1sm14065815ljf.53.2019.07.31.11.44.03 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 31 Jul 2019 11:44:03 -0700 (PDT) Date: Wed, 31 Jul 2019 20:44:02 +0200 From: Niklas =?iso-8859-1?Q?S=F6derlund?= To: Geert Uytterhoeven Cc: Zhang Rui , Eduardo Valentin , Daniel Lezcano , Marek Vasut , linux-pm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] thermal: rcar_gen3_thermal: Use devm_add_action_or_reset() helper Message-ID: <20190731184402.GL3186@bigcity.dyn.berto.se> References: <20190731125053.14750-1-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190731125053.14750-1-geert+renesas@glider.be> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, Thanks for your work. On 2019-07-31 14:50:53 +0200, Geert Uytterhoeven wrote: > Use the devm_add_action_or_reset() helper instead of open-coding the > same operations. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas S?derlund > --- > 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 > -- Regards, Niklas S?derlund