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 9007228505E; Thu, 16 Jul 2026 14:22:30 +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=1784211751; cv=none; b=TsxbOdVvqS73+XLltlpWq7/BZkGVoDp4TKILPKCJA7WsryhitPDHBJjt1yP/x38oQoNgLD5lrDsE6gMp3oya0VVmGTZk8+TPiaarJtOa31VYf3T7+JY4zZQyEvAU5Vef+fusFjnyIIl5fStuJ/hNksMuKUVgGXihGu2vEpGR3uA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784211751; c=relaxed/simple; bh=gZ8IgD33JGGDDRB9GybaI98BDYHY35dG4C5Zz9grCME=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K8ZlVwwvnrH4S0O7/X5QQCt3G7uKAbShL4KAyqiLfv4drqY5UUY5LtpVmvv4qcDBJhgwNtk1n2SCnD/qvApQEcBTDdyCSzRPbRuUZ4S3O2aAuxyDeb07nKIDS87it52MeUhL9AeDI2xTGs5gi5vPB8HpShNY3aM9e2pD3fo6KFg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lAyBUBbI; 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="lAyBUBbI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F39C71F000E9; Thu, 16 Jul 2026 14:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784211750; bh=eKwFT/CloNpe8/G7pb5rG6skSc9ejeFyFiQm0ZyiVwo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=lAyBUBbImM4lWEG7sO82YxgsiZMmTbeVh+2ZQMBIAXdaxBBkoqP3Ez7ZEpssou5Uq Rmpf2zXbkOhIpoBDBs15VplwRqNHgwPcVyKNxnfKWZlHsV6lTiyU0gzktZQUfRHPey Qp5lFbjgcrwps/tFPLI5GEbKTDkCIyt83Sc4WMVc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Stepan Ionichev , David Lechner , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 6.12 067/349] iio: resolver: ad2s1210: notify trigger and clear state on fault read error Date: Thu, 16 Jul 2026 15:30:01 +0200 Message-ID: <20260716133034.822259377@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260716133033.287196923@linuxfoundation.org> References: <20260716133033.287196923@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 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stepan Ionichev commit 70247658d0e783c93b48fcbc3b81d99e992ff478 upstream. ad2s1210_trigger_handler() walks several scan-mask branches and uses "goto error_ret" to land on the iio_trigger_notify_done() teardown at the bottom of the function for every I/O error -- except the MOD_CONFIG fault-register read, which uses a bare "return ret": if (st->fixed_mode == MOD_CONFIG) { unsigned int reg_val; ret = regmap_read(st->regmap, AD2S1210_REG_FAULT, ®_val); if (ret < 0) return ret; ... } Two problems on that path: - the handler returns a negative errno where the prototype expects an irqreturn_t (IRQ_HANDLED / IRQ_NONE), so the caller in the IIO core sees a value outside the enum; - iio_trigger_notify_done() is skipped, leaving the trigger busy-flag set. A single transient SPI/regmap error on the fault read then wedges the trigger so subsequent samples are dropped until the consumer is detached. Convert the error path to "goto error_ret" so the failure path goes through the same notify_done() teardown as every other error in the handler. Fixes: f9b9ff95be8c ("iio: resolver: ad2s1210: add support for adi,fixed-mode") Signed-off-by: Stepan Ionichev Reviewed-by: David Lechner Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/resolver/ad2s1210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/resolver/ad2s1210.c +++ b/drivers/iio/resolver/ad2s1210.c @@ -1334,7 +1334,7 @@ static irqreturn_t ad2s1210_trigger_hand ret = regmap_read(st->regmap, AD2S1210_REG_FAULT, ®_val); if (ret < 0) - return ret; + goto error_ret; st->sample.fault = reg_val; }