Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1381535ybp; Thu, 17 Oct 2019 11:57:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZLogXEqLmPdCgzJ8ZdKjfZVwpRZDS4L4uunIrSWR7juLwGEx0z3q1IO2lmJeHb5PAugEq X-Received: by 2002:aa7:c303:: with SMTP id l3mr5493223edq.234.1571338677380; Thu, 17 Oct 2019 11:57:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571338677; cv=none; d=google.com; s=arc-20160816; b=CGSBwA11EuuNNaBX5HUVhKSp9n67WS1rwNgz3wVSXxiXZTZs7yTDNb4VX5ZDSnHZk3 qmVgDAGlzzIU8M2a/pZZ17owTcoa1bOazAB8mcN3azI4pfSfNqJYAhE9drr3mw8jLNhP KJv9NVbyRp2m9p69UF3dS49XMqPOIrZEedpv6JAPsgw8VgH1uioz80aP26xQXMs5sixp lQT/SNVykeOqhUKREofHzYz9kR6C/4Td9xSVqFbwR05yG3RQ3EH88nr+0Sk9T1SLIfQ5 P11i9wBKYwQLrGA5UpxcFM62Norum7229Tq1Mov24lDFkxEn01dfyxryvRZGQipRwVBo c+3w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Fgp1kHQUEeySk3HgPsPuTssvyNVNuF3c3rf/WHB2ljg=; b=HLpyof5wHdSHx4vSyHHQcuixs1U2sb9IacokBSwKUfdKdXZH+0YzeXJSTHdeXmKLbP bUv82FQsX19GT2IUgFL9Ls4FQJtx+yumIZeMBs03qPf1DnYP9783QGovtyDEvZMjCZsN d0qQuE4tpmmi8ZQapu1lBP4a9/k3v7SsVctaNPWgwK8+0gyaPfCWsMnP7upPL/eViwTj ZxW0tbUa05AE6aayPQiCRUEeIjG0xOa6jcpNvwu+HC3cigap4SthfYjFLZElR+mXP6Rd 2Q+23sTVgtY2bz4gzM8RwWaHPc7niGmyn5DTybw6U/FBMRBFYxt8wvsnr417azer5PNv l1Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l8EZEGqL; 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 p15si1858090ejx.56.2019.10.17.11.57.34; Thu, 17 Oct 2019 11:57:57 -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=l8EZEGqL; 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 S2407318AbfJPWLn (ORCPT + 99 others); Wed, 16 Oct 2019 18:11:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:48572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395401AbfJPV4j (ORCPT ); Wed, 16 Oct 2019 17:56:39 -0400 Received: from localhost (unknown [192.55.54.58]) (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 36D6321D7D; Wed, 16 Oct 2019 21:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571262999; bh=cOwtfjxBvvQosjr82wqCP+8UkphEQZiAwZA6WXjNgSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l8EZEGqLxrGSOdk8GVLv1c6ikfCPN6Q8zngPb1RBcThRHBVbCAMgSfRPzgYYH8QsN PUsee3c4SvTp8aNAoDqW1rV29S6+TmDwvz0cPk7SCUKklXAbFoVMU5P3N7GiqPlrJ7 fkIsxBAkY+mFcFtaC5qFpA9qMvak/bzw0rbV+EkU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marco Felsch , Alexandru Ardelean , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 4.14 40/65] iio: adc: ad799x: fix probe error handling Date: Wed, 16 Oct 2019 14:50:54 -0700 Message-Id: <20191016214831.320338883@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214756.457746573@linuxfoundation.org> References: <20191016214756.457746573@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marco Felsch commit c62dd44901cfff12acc5792bf3d2dec20bcaf392 upstream. Since commit 0f7ddcc1bff1 ("iio:adc:ad799x: Write default config on probe and reset alert status on probe") the error path is wrong since it leaves the vref regulator on. Fix this by disabling both regulators. Fixes: 0f7ddcc1bff1 ("iio:adc:ad799x: Write default config on probe and reset alert status on probe") Signed-off-by: Marco Felsch Reviewed-by: Alexandru Ardelean Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/ad799x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/iio/adc/ad799x.c +++ b/drivers/iio/adc/ad799x.c @@ -817,10 +817,10 @@ static int ad799x_probe(struct i2c_clien ret = ad799x_write_config(st, st->chip_config->default_config); if (ret < 0) - goto error_disable_reg; + goto error_disable_vref; ret = ad799x_read_config(st); if (ret < 0) - goto error_disable_reg; + goto error_disable_vref; st->config = ret; ret = iio_triggered_buffer_setup(indio_dev, NULL,