From nobody Mon May 25 06:41:11 2026 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C26A027A462 for ; Sun, 17 May 2026 16:24:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779035047; cv=none; b=mnM++BOGBTW9O/De4LsL9XftIsvial6j6r0hGYZ+88HSK0vGKlexgBLh+kkRIgi1l6mEdQVjvl8/9zp9j5giwGX+WmpVw2VT2ElJA9ciJCL3aSuD3TDj/rWg/PKFGCQ+qh7zi24FHqYc5/hfBBV0djbg9iFwWP7j5yXjfYW9Fqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779035047; c=relaxed/simple; bh=szJiY6EJbu4bYlsozrvbiskziHki0cBuDtsWP1MNp+k=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Cg8aT30KV0ikKuKh3OPbt+JV79DOMv1+ipC+0KRm/iQXVQ4ohaku1AEcca+IPMz++ZEVhZvnYWAG/R8qz2HiJMFJwyDupOwvMGHHyjEl3n2MsAAXmg5oMlBiOtcdPN+hQ41FNw4mpBjAHXgO1sfi+bMdiPeRFuGeJZhEXUXqUlY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kZOgsJOw; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kZOgsJOw" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-45b030a5696so165737f8f.0 for ; Sun, 17 May 2026 09:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779035044; x=1779639844; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4xQUzenjZFV6yOOyNJ+dSYEulDJrlac0Nc+paPih8Tk=; b=kZOgsJOwmXvQPSNYWHmCr34oTy9ILavNhr5IZDPv5N+W+3rxCys5y5p8EWMeS2uMPJ QkgKy8pAhpSkio3CmNAVaBDqX7E0k9GpIfstIvimgYenRB+Cxn+H5yPJ+G1hBdjuMTMP iwQLAO2W819MdvjbZIwoJ1CvVbh2HpZWWICXeXi/1rItMcaV1HPjymR3Dpuf1Zer1QpN 9AIWDpsQDOrWLwKyL+rcwtsAgPSCBVDo7QY5F2bTeqpLr+0E+ODQV2qfttY5Xt5zPb0E jMlYUtaZD1/PvhzwaBXswowJyFDFf0PVNtooCoV5IGfyavvQ5SWI5AXPDvN0aZmTVQC4 kxnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779035044; x=1779639844; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4xQUzenjZFV6yOOyNJ+dSYEulDJrlac0Nc+paPih8Tk=; b=bSQ/OsATzwTGFayx9LS/5YgPBirPSssdTOnCSUBHZJjjB5w78+drZ4o+tO/WpKmNWJ XaEXMQldkuZ2hTkm0PoM75AmdswnpNkFG0BFr9e2YDpTKfdfd4yoaGLw3XWpP+9EhMTF H4dd3mJ/T/afhMJcxGxx5I5H8og0xkrAG8OddAiB+GS4QzxzvoPH/034wfwqNa7VPKY4 exoQyeFO31HFgnxXPtdLeRaXVoaIOl8qVXoosspagjsalqxiiuiGm5kMKbMNCl/dWUTM f4A02aPOGGFYXFCPK1XpRGNUXIJD9+PII1AdgAhBb2mgLO/NrQTRv0Fw1tsI5jFDGCzZ 2gSQ== X-Forwarded-Encrypted: i=1; AFNElJ8eQvpe137F9SOfT0lNGXM0X8BPNQykBrmdJgF5naQGqMEPKlZvpvdJhWFIH0YKXR3dRoEst9plkd6vWe8=@vger.kernel.org X-Gm-Message-State: AOJu0Yx8c0LZRPlBJFoqo/8jm7gylyPDKhDkua/3OPo/kabDJqDwwhlR tfXZQ3+oHSzQxzhl6ULtzsH3gm+a6WREYyGzFgR737IgLVUJALNqmnEs X-Gm-Gg: Acq92OH7/hZ+/iP3D7tVsDHYffVtj1MSsTMDzKyQFNaRSvZwDFvHqOBnvO6Vpyp94NF 2W2r5LnLx053ajMI3s158ixQASrG+6TAcBPlWucAUOwGP0grvuEqHfGKSx2soL8k6jC3NaLL2zC XtS8Rh7uhT8rT/JipazxButaAgLAZD3YHpjfYX3Tixk4+JGHDDIzMR6EhgCFtCSji/GgwJzqAr5 N+6z1vyq2yNuIPLCIGFH2OfgarjyX8V3/ipxzQuZ1+mxpe0Mjz2tpDSqLKY/pKXfUwg4SNmbTST yubgLsmPOnqFrVTl16c2zYqhbU6LwpzU+J0tRR9Dz5pwePEfBi6RKwRriAY6umkHQmanFxh/tBG G3YvswUQ9wlSoSRiYSyQHf4D03qZzAeIXuhniDGNFTP5D96OSdGa29tHJ26vZIsYacs1GJtKHZP 70wP2r1X0XgJqs0YsrbVrGay4KW9bH1XJth4Wm6QNM3M4r X-Received: by 2002:a05:6000:1ac7:b0:43e:a978:c25e with SMTP id ffacd0b85a97d-45e5c37d119mr8648504f8f.1.1779035043883; Sun, 17 May 2026 09:24:03 -0700 (PDT) Received: from localhost.localdomain ([82.215.118.79]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45da0a19c2dsm31481840f8f.21.2026.05.17.09.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 09:24:03 -0700 (PDT) From: Stepan Ionichev To: jic23@kernel.org Cc: daniel.lezcano@linaro.org, dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, gregkh@linuxfoundation.org, hcazarim@yahoo.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, sozdayvek@gmail.com Subject: [PATCH] iio: adc: nxp-sar-adc: notify trigger on channel read error in buffer ISR Date: Sun, 17 May 2026 21:23:46 +0500 Message-Id: <20260517162346.189-1-sozdayvek@gmail.com> X-Mailer: git-send-email 2.33.0.windows.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" nxp_sar_adc_isr_buffer() bails on the first channel-read failure without calling iio_trigger_notify_done(), so a single I/O error leaves the trigger's use_count stuck and the buffer flow wedged until rebind. Route the error exit through a 'done:' label that always calls iio_trigger_notify_done(). Fixes: 4434072a893e ("iio: adc: Add the NXP SAR ADC support for the s32g2/3= platforms") Cc: stable@vger.kernel.org Signed-off-by: Stepan Ionichev --- drivers/iio/adc/nxp-sar-adc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/nxp-sar-adc.c b/drivers/iio/adc/nxp-sar-adc.c index 9d9f2c76b..ed004812c 100644 --- a/drivers/iio/adc/nxp-sar-adc.c +++ b/drivers/iio/adc/nxp-sar-adc.c @@ -341,7 +341,7 @@ static void nxp_sar_adc_isr_buffer(struct iio_dev *indi= o_dev) ret =3D nxp_sar_adc_read_data(info, info->buffered_chan[i]); if (ret < 0) { nxp_sar_adc_read_notify(info); - return; + goto done; } =20 info->buffer[i] =3D ret; @@ -352,6 +352,7 @@ static void nxp_sar_adc_isr_buffer(struct iio_dev *indi= o_dev) iio_push_to_buffers_with_ts(indio_dev, info->buffer, sizeof(info->buffer), iio_get_time_ns(indio_dev)); =20 +done: iio_trigger_notify_done(indio_dev->trig); } =20 --=20 2.43.0