Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2890992ybh; Mon, 5 Aug 2019 08:27:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzex9V3CYRkyRQhOM+h7Bp/q9T8fUl2iUW8m185cswpOkhjNpcY9OcGCT6myP6uckWjVl9r X-Received: by 2002:a17:90a:c58e:: with SMTP id l14mr18641603pjt.104.1565018869578; Mon, 05 Aug 2019 08:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565018869; cv=none; d=google.com; s=arc-20160816; b=a9XxSH74foBVrEB7aKVI3usbIylIMJjUZnAgnS0FpqoUpu0qNTDJ3Q1nwHNoSkF/4T sxRCXPtCwI4Bdays9oA5aoUcnQ21tV3vau93H53s9OuheLlZH5dOtvKvZgjMpsQLtWGy DFvxscEayYkGwYl3nfhk7pG6qrPTRTbIN0ZhhfJfkq6M6XvVFaG5XrUrhp1UCOtV2Y65 0PzB+c/3M+2zvaW+zMpx7xhgvcJaQ/1oi38TpBKm9v0LG7jmcp1Zqgx9RgZ5RR/L5oxo 5LbjJiFS5H5ue76J4i0qnmA+IdSUFtgLxuD5fV8MvdCf8Vu7UxWoIR5rqC9m4WotULBd zLbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=8arF+ddHp+M7YiKhY9HaCVC6U+ktCUBvhpyvdOa/754=; b=T0MTv9DJqE68Kf7Tdq4RfnV7ajl4K6hHg1dAZNGuAmOsIqtk2Vai+zqVeCJoFNepBZ 1CEj0me8JiZnlKkP0spFizIKuO1OQYpTQlb63hg7tX0JQ3Kobms9eJMeeKfoqZU5uOpt JqdInSGFHbEgTpThbdGfUMGw5ObpAF3cJTenXvrkidyjwV2C7FrOqCyUYkhH8o2fldE3 B7VBRGr+axkKUZdEE7ZwfspjYb9em/w638bBJDrO24uO6z41vf9XT3QeeI5734cCrKAR z+pxtiicuvDj/QBweGGzh4BRrQGJQQn/sX0o/V9X6g0b5DpgYNquIWUERe0L8W3dQUfj SUtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wvIANRTP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cl14si15344819plb.341.2019.08.05.08.27.33; Mon, 05 Aug 2019 08:27:49 -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=@kernel.org header.s=default header.b=wvIANRTP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729246AbfHEPZf (ORCPT + 99 others); Mon, 5 Aug 2019 11:25:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:41332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728468AbfHEPZf (ORCPT ); Mon, 5 Aug 2019 11:25:35 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3435120880; Mon, 5 Aug 2019 15:25:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565018734; bh=46qT1njeA/amYMLiDTb4zMUL3B7EVT91q/FztoHlmQA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=wvIANRTPX4AeyxmqbYyqGn8M07hRGn27gjj7WdBTWhCwLVSLFMFz58SxBw056LF6j +yI/mGvRv4rNTARY5C/UDPUjEeAWOZq418bXkyhEfL9A5n98sg9JWTnTGV+KtXWUr5 1TeDBRT2rJz+LRpauU6dPCyXcvUf3G/ny79IW4z4= Date: Mon, 5 Aug 2019 16:25:30 +0100 From: Jonathan Cameron To: Brian Masney Cc: Chuhong Yuan , 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: <20190805162530.4c24df1c@archlinux> In-Reply-To: <20190801093731.GC27653@onstation.org> References: <20190801073557.9578-1-hslester96@gmail.com> <20190801093347.GA27653@onstation.org> <20190801093731.GC27653@onstation.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Aug 2019 05:37:31 -0400 Brian Masney wrote: > 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 > Applied to the togreg branch of iio.git and pushed out as testing. Now the fact we have a fix in the middle of this series is a bit unfortunate as it'll mean we need an explicit backport to take that for stable. Oh well, if anyone wants it up to them to do the work ;) Thanks, Jonathan > > > > > 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