From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CF2944AB91; Tue, 21 Jul 2026 22:33:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784673225; cv=none; b=XkoCS7UVa/A+yIMJM2bO3WxDcZ53vnudDEIGIha5sdhAD6c/UF41kr0jKz8bj6/zxrLddp1TG8CnLMPyvG0OFd8L0CyRViUcqhYxpJ3ri+/xKqBmpMaLekMNZYXeKMUisucPF45oss2k6EDkvzmxytgfXg33su4lZE8WCYQppXQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784673225; c=relaxed/simple; bh=ZUm6CqZhndkrvkKMIF/dfa5jbN9CkqDNrAIi4gwpM70=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=klHQ6Z41RvyfQESC9VA/wyrTuYHHL8xigdm5Y0GT4xvqQrwywMxleXz1BWP4st3XdEzHmvtoRY3giNpvhTjrR54JSaLsU74ngaqLA5Uw/y2/QYMgMAXpxbooGe8qOROmqAXTHHaugSc002Wd6wQ9U+41vV6wbVT4KCDR3+5HV3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Utuuw2P6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Utuuw2P6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F31EB1F000E9; Tue, 21 Jul 2026 22:33:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784673224; bh=1BkTM8x3i1P0D40flPkCc8zinMnymLc94Sewq+jYBB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Utuuw2P67nnWmOb7m9WzC0aez6mTmSuXjm7EpnzyqkcwC/z3/LhwFVQJbadyB81F/ 1HqCAW9B3BzkBdMip1H5AbIIkRDEPNawfGBijMXyRMpCqkgmEmYCiF6dIzbyixf5Ec LgMC+/EeemJtdjX/XeaB3GkuS5Z1orKGlTC3YXIQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Joshua Crofts , Pengpeng Hou , Andy Shevchenko , Jonathan Cameron Subject: [PATCH 5.10 038/699] iio: adc: ti-ads124s08: Return reset GPIO lookup errors Date: Tue, 21 Jul 2026 17:16:37 +0200 Message-ID: <20260721152356.569311195@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152355.667394603@linuxfoundation.org> References: <20260721152355.667394603@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pengpeng Hou commit 7dc4de2aa6316f1d044cde21f5acfec5f3ec6b47 upstream. devm_gpiod_get_optional() returns NULL when the optional GPIO is absent, but returns an ERR_PTR when the GPIO provider lookup fails, including probe deferral. Probe currently logs the ERR_PTR case as if the reset GPIO were simply absent and keeps the error pointer in reset_gpio. Later ads124s_reset() treats any non-NULL reset_gpio as a valid descriptor and passes it to gpiod_set_value_cansleep(). Return the lookup error instead of retaining the ERR_PTR. Fixes: e717f8c6dfec ("iio: adc: Add the TI ads124s08 ADC code") Cc: stable@vger.kernel.org Reviewed-by: Joshua Crofts Signed-off-by: Pengpeng Hou Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/ti-ads124s08.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/iio/adc/ti-ads124s08.c +++ b/drivers/iio/adc/ti-ads124s08.c @@ -323,7 +323,8 @@ static int ads124s_probe(struct spi_devi ads124s_priv->reset_gpio = devm_gpiod_get_optional(&spi->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ads124s_priv->reset_gpio)) - dev_info(&spi->dev, "Reset GPIO not defined\n"); + return dev_err_probe(&spi->dev, PTR_ERR(ads124s_priv->reset_gpio), + "Failed to get reset GPIO\n"); ads124s_priv->chip_info = &ads124s_chip_info_tbl[spi_id->driver_data];