Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7082114ybi; Thu, 1 Aug 2019 02:57:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWhb0lDTipO0OP8e12sp6kep2c/f9yxjwLcV767WDbcJM9DTt4ePVsxA3oRBSQP1AUDXlU X-Received: by 2002:a17:902:a409:: with SMTP id p9mr126305989plq.218.1564653457460; Thu, 01 Aug 2019 02:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564653457; cv=none; d=google.com; s=arc-20160816; b=f9RfhAVr4+0V5vrRzOxTDW2/GcekJQ0Ury8WVg80ElxUfe9ID31+2Me1WvNATHeUCB JJK4RylvuSFT3dJQQqUJUotuAgi1ZrD7/nVnAgIRQE9RgIN5pG3HFeZT6lkBaWw+nCGe bByugbnL7KeQwuQ8ooXbOvn0/iU/prA7F4wFdG9L+kjleAIhk1qY2qudUeFBh4l7rmQR oHhuAc+yVimEyAG5sCOQW0xJa5SWI46Tf8x7KnCPipK9iPKiLeWpR1ou2v7x8/7pac0Q Q2pFP/biVZTJw62BQLabSP9BJVaf++v+EfNTzY5v3AhMrjI9TEfq6PXk2ZxlygIp+mQC pPKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+G+lZRRjezTQsPQE1E2TVb2cnQ2UFTCM/VnZE78mkc8=; b=IM+q3R4hogJXrieCWeUYzseiKOdwLEglli07yCM8zxZtTnjS+EuHVaRvV9C9CiE3/I FhTc36US0wxO+bAVFaD0CLvIHn9AtkgCEIchdLP8QFCfXY5CvgPM1+Y7ycp98/c5/EeY MkPE6OwolRJsF/L7WuDUWZrr5M5ynN0zGHmsKLxYDCwtOFWOcH8mq+zgaI+zhMfgWOe2 RowhzKZCv39owp+dDTCRX+uKXTiLMl3K0YNFnagGT52ZUW/C32r29m0r68bE0++Etj4x 8Jt+/UmSWssUf9qVltjLgexizB7IORqH6nIWW9nmhtLYcOKVTOCw7ocuEB6pu+hU6zbS c0jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=r04tkst3; 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 g3si36962020pgo.241.2019.08.01.02.57.21; Thu, 01 Aug 2019 02:57:37 -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 (test mode) header.i=@onstation.org header.s=default header.b=r04tkst3; 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 S1731205AbfHAJds (ORCPT + 99 others); Thu, 1 Aug 2019 05:33:48 -0400 Received: from onstation.org ([52.200.56.107]:49214 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfHAJds (ORCPT ); Thu, 1 Aug 2019 05:33:48 -0400 Received: from localhost (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 6556D3E910; Thu, 1 Aug 2019 09:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1564652027; bh=a7jk3oZqV6hjmmCfmpPubw/i3qx5j3DufQPR1lxReFQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r04tkst3UI4t72iV457sH2NZ0cIemxdGIfDLN5kyy2ScN1ZCr0u6nFV8/JwX6LxSO u6COlXDOsxyTqHS7piMEfL2qoCvH/typtIqLpKq9Y3KlsdtgBMCukrn16QD2YZsVJV eOlWR+K/Ch6LCyp9CNkGODgMWgcXaWH/KCAZGmmY= Date: Thu, 1 Aug 2019 05:33:47 -0400 From: Brian Masney To: Chuhong Yuan Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/4] iio: tsl2772: Use devm_add_action_or_reset Message-ID: <20190801093347.GA27653@onstation.org> References: <20190801073557.9578-1-hslester96@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190801073557.9578-1-hslester96@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 01, 2019 at 03:35:57PM +0800, Chuhong Yuan wrote: > Use devm_add_action_or_reset to remove the call to > tsl2772_disable_regulators_action to simplify the error path. > > Signed-off-by: Chuhong Yuan For the whole series: Reviewed-by: Brian Masney I forgot to mention this before, but next time please use a cover letter if you're sending more than one patch: git format-patch --cover-letter. Brian > --- > Changes in v4: > - Split v3 into three patches. > - Revise description to make it more precise. > > drivers/iio/light/tsl2772.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/iio/light/tsl2772.c b/drivers/iio/light/tsl2772.c > index 83cece921843..29cfd8ae2700 100644 > --- a/drivers/iio/light/tsl2772.c > +++ b/drivers/iio/light/tsl2772.c > @@ -1807,10 +1807,10 @@ static int tsl2772_probe(struct i2c_client *clientp, > return PTR_ERR(chip->vdd_supply); > } > > - ret = devm_add_action(&clientp->dev, tsl2772_disable_regulators_action, > - chip); > + ret = devm_add_action_or_reset(&clientp->dev, > + tsl2772_disable_regulators_action, > + chip); > if (ret < 0) { > - tsl2772_disable_regulators_action(chip); > dev_err(&clientp->dev, "Failed to setup regulator cleanup action %d\n", > ret); > return ret; > -- > 2.20.1