Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3725335ybt; Sun, 5 Jul 2020 05:00:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6rgd+WylApMdRgzmWL1SqCvY5XiNVvlWMyZUjZTJIDxyBV8SotckjzbdpzrxeHrU5kMgC X-Received: by 2002:aa7:c657:: with SMTP id z23mr41534076edr.265.1593950423480; Sun, 05 Jul 2020 05:00:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593950423; cv=none; d=google.com; s=arc-20160816; b=SowOjaWnEUPpwbdZINPzbZWHTPIRWhTh5j3h5h3YuCdT1P4eldTv/Sz+yizXbTd/Ov 4c5cOk5UMXVGtlF58zoH2rIBMgFlQhossiCii3R/SkSNqYK6zb7/0/F4VTI82aMvmf5S XfJ4Kw8mJPrLSQ3eIAOAWRRwomJRN6hoRgun9d5t+YCg6M2xhrQj7g9gDIwF1dlWT1G3 kl9PFf96Shk+y4m4AZAAWRkJ47PdivDttKx2xwkUBekvRuihsKcbVlrQoHMcWMTHPFjW 5vjSl5Pxi8YV6r3nXvQSp1OHiekmrQl00oYLAfvN8ftG9DfJS5iWKFx5obg0s+sNsweE AY5g== 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=qxJp65buW3KubbK0GFvKZrTM+DAEVgLO4vHXI30nFwg=; b=o+IZYyAOo+tNWKr/+JTkHy15PhEZe0hp71ZyR7w5XOtTGIarr+vXQj+zy66vgFvK92 +bo4UB+XC8RVr1S/rQa1LKzvSCogiYW4wHn+ASmNv/MoAs6z+1GFHsrWq+9ePOeqe80T e4buYvNLQJNMya/QrShbTCryiZcbwBOcLgTi+k/0w4qmQf93/nZXhRk76rgvtt7k2HTZ 88K2ECF3fN2flsIl32d4ISld/EoIG4/pPIbqkwathCPiuRJRrAwAtXKpaaFnQWI95gJC 63u3tWtlWkKpvTs4JJJ8Ny0clY5EN7MzKHV5SSKbAxdFmO305uUYW+gvow9ZKZYx77sq g9FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ANj26gvS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id a1si11891976edn.58.2020.07.05.05.00.00; Sun, 05 Jul 2020 05:00:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ANj26gvS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726869AbgGEL7k (ORCPT + 99 others); Sun, 5 Jul 2020 07:59:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:57852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726454AbgGEL7j (ORCPT ); Sun, 5 Jul 2020 07:59:39 -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 B676920708; Sun, 5 Jul 2020 11:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593950379; bh=jbRIrixoWn2wn5oaON87KKkPJd5FmrO9b7ka7N4hgrk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ANj26gvSSKhAJ6k+Pnrg6oJP4v0rt8rdFOz/5D7I6wlHQKJeTVj+5OGSsz6xJuOQt 5trO/iUy3WPHHsh2DOuSjRBR8XpWJFNIz8JSxaBZ8lRlFTB/HsYm2XGdoSd0UZ6uk/ SAO3o8UXeiBHbaO1CgPjfj/S/bqPnn3JhNxTnASM= Date: Sun, 5 Jul 2020 12:59:35 +0100 From: Jonathan Cameron To: Renato Lui Geh Cc: Christophe JAILLET , Michael.Hennerich@analog.com, lars@metafoo.de, knaack.h@gmx.de, pmeerw@pmeerw.net, giuliano.belinassi@usp.br, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] iio: adc: ad7780: Fix a resource handling path in 'ad7780_probe()' Message-ID: <20200705125935.025cfa12@archlinux> In-Reply-To: <20200518022129.xkcuw4yxotnll7ym@renatolg> References: <20200517095953.278950-1-christophe.jaillet@wanadoo.fr> <20200518022129.xkcuw4yxotnll7ym@renatolg> X-Mailer: Claws Mail 3.17.5 (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 Sun, 17 May 2020 23:21:29 -0300 Renato Lui Geh wrote: > Acked-by: Renato Lui Geh > > On 05/17, Christophe JAILLET wrote: > >If 'ad7780_init_gpios()' fails, we must not release some resources that > >have not been allocated yet. Return directly instead. > > > >Fixes: 5bb30e7daf00 ("staging: iio: ad7780: move regulator to after GPIO init") > >Fixes: 9085daa4abcc ("staging: iio: ad7780: add gain & filter gpio support") > >Signed-off-by: Christophe JAILLET Applied to the fixes-togreg branch of iio.git. Thanks, Jonathan > >--- > > drivers/iio/adc/ad7780.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >diff --git a/drivers/iio/adc/ad7780.c b/drivers/iio/adc/ad7780.c > >index f47606ebbbbe..b33fe6c3907e 100644 > >--- a/drivers/iio/adc/ad7780.c > >+++ b/drivers/iio/adc/ad7780.c > >@@ -329,7 +329,7 @@ static int ad7780_probe(struct spi_device *spi) > > > > ret = ad7780_init_gpios(&spi->dev, st); > > if (ret) > >- goto error_cleanup_buffer_and_trigger; > >+ return ret; > > > > st->reg = devm_regulator_get(&spi->dev, "avdd"); > > if (IS_ERR(st->reg)) > >-- > >2.25.1 > >