Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7083407ybi; Thu, 1 Aug 2019 02:58:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzE62i4DxL+X8Rv4MSU/ZNeBA9sMFIYCylIyctklLCnK0nsD71glFIDQDuSBdYnZ5/4hs0/ X-Received: by 2002:a17:902:2be8:: with SMTP id l95mr116246909plb.231.1564653536176; Thu, 01 Aug 2019 02:58:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564653536; cv=none; d=google.com; s=arc-20160816; b=XVbSP+ScRdgNTBojxQ10TONOIXxXrZIupPGYfQNs3tt8ulRSsa8b/YvUh2tja/WtcH l4u2M5tS4V7BtjJH7hqhW0kqUnCefEKgB5iK99bOuIq/czYsdeopH5ulp82LmDcOToN6 ZB6JYRuAkvgKb0P51B4Iv06DqmDQ7hR6X/jZPMhNu9ujDRdIqlWoL7pUWi6sFr+w3JqU uwSTghOXiUQpA/WltpM0uIQo64m1PDpCsohWgDX+X0XPlgkimn25z+rPP5Ojwau3Zv8G 8yRincrNVx67ilbnR5NCLAy8PXTQPDgu1NzL5GbByjqsTURRCW9fErSH99xqQcwwuWDM Zy5A== 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=euOHhttVkNjzhpCnpwztmw4E47yl8lo8W94+myDcPSY=; b=EIzjfdPSninIF1hspWde8N4IREW+Ndj2yNFJqMm3gihgZEZTEm32upS7TyqfVkRUT/ QkYCuj784tEbYR0xkBlmWEFxoMH/NAmCMNDmkhakqZvBXUnvhqS8sBZWzMz8p158F3+y CXDwOK3djTYLc9f//B2deF+pWj6iBQHm9grZJAWNy7gLhFyo59hEnzNLofUrb/0UDWZJ zP7FdHvp2v3mFe+6SoWifvmMsnr10iun687oKovn1byMUFxxdZMJo5zIBESrn2nKZjfD hUv+85//Wp7UF2o1C0NKfWXMTxnN9UletiUZQnFeWe5+cu6NMk3Fyj1CyBBEsbwkdTSz GPXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@onstation.org header.s=default header.b=Nj95LxDa; 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 1si71789pgn.300.2019.08.01.02.58.40; Thu, 01 Aug 2019 02:58:56 -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=Nj95LxDa; 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 S1730596AbfHAJhd (ORCPT + 99 others); Thu, 1 Aug 2019 05:37:33 -0400 Received: from onstation.org ([52.200.56.107]:49252 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfHAJhd (ORCPT ); Thu, 1 Aug 2019 05:37:33 -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 AEA9D3E910; Thu, 1 Aug 2019 09:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=onstation.org; s=default; t=1564652252; bh=bSREQHe0K6R3ACsHI8onhePS75HmOgPd/6TZve63MgA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nj95LxDaFriwiQaSAsOJb7M1D+sCBezKlRMBw0ZBe3WQ1vgmtEF6M1lVy5yBF385X NThk1/24wo/YdDGOnvl2OnZ67NcOi7SsYZcJqDrH3ZNUo0UofDMgAYJC0vq9YvIoA3 8ZZhEZ7KfNsuLfSx6EeRvavP5EE2Rlobb1uijBro= Date: Thu, 1 Aug 2019 05:37:31 -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: <20190801093731.GC27653@onstation.org> References: <20190801073557.9578-1-hslester96@gmail.com> <20190801093347.GA27653@onstation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190801093347.GA27653@onstation.org> 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 05:33:47AM -0400, Brian Masney wrote: > 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 Oops, I forgot to add this as well: Tested-by: Brian Masney I tested this on a Nexus 5 phone. Brian > > 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