Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp593007lqo; Wed, 8 May 2024 08:58:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1GQC3md9eu+aIwt0TwBoPZmBBKrj+S5T+4XBcOuZJH/x4FZvdPBlkJ/O+wOYHthsBROersVt3iJXqtWZs43WQIz92m9stg7BGe3duqA== X-Google-Smtp-Source: AGHT+IEQXj+BPiCxfp6zZo15Klf7w4xfcaQ1be4myFjGjSilIMk1U3Phhz1BKni9vQ0Ty27vfLzR X-Received: by 2002:a17:903:1247:b0:1eb:1663:c7f7 with SMTP id d9443c01a7336-1eeb0998c27mr36019045ad.43.1715183924837; Wed, 08 May 2024 08:58:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715183924; cv=pass; d=google.com; s=arc-20160816; b=LvFxtTRapixe6oU3z/Y/anpqwV0rF/jysm1fy7bkzG0WVtpVtCm7tyJ2/ZIwGIGvPp N+cQ4WnmP1j7+Sb6B9D7zlPAsneqfDZVZl9otUhdqa5gz0TblsGabSy/hIw6JE0u1Y09 1rWuQPoSYsKVLs6ph6XraedQjgMu2E1tqtknVXSFXwM9NiALyM1jPl4xS4Zq8Dq5/wmw F20jSnS4HC+nIfUCDEpO/yQZoxa+18NoNSy08tvq5JDj2/l9LFJbbiUytS4ejQoesT9w 5Q/0KOIVkWMSUsyFYChd8SsRfyDi5VQaxutvUMv7Vb0n8V3LpgrXT4xjkT50KZK7elF5 e/Mg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=cln0XHavbSCYQSNhIzrP83D1DhQuAwb+RqJP98JjwjE=; fh=2LtkEOlYNF/WIpeYBB/z4qwJeVwvh5pzUZWh7IVYs4I=; b=Zpa2Z0nD8jE2fo5hytVhohRB4T6DP5sgAHKn/Z4bDWsDXcinHy9tBRmzOqkn27+0qM oXm2SZh/k5tc4ey/gUO6esvSp9rWSV5jbfd9hCqX4AT3Orsyg9RShq1c3x8IHIL9QUEf 8Dtse4h3Ax740FMfloTpF7TTb86h206iiQZ6ipvprh1/n6gJzEQyT0Ss/CpsHLznJkG5 M/5g2DIxvYIZIGqn+Q0POU0Om30KacsOcdQbxxjY0mCOZ/gPGat9kzaBHKS1G+gaB5WP P/f5WdAXYXTi+KD61igmbKAJkW5XsiiBa0ykBnXez5O6xYnqn3UxAzohdGfBZ7X8hlRl oLrA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Gc0wP+GV; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-173515-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j8-20020a170903024800b001e84ad9651asi13075159plh.506.2024.05.08.08.58.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 08:58:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173515-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Gc0wP+GV; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-173515-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B7EC8282DE7 for ; Wed, 8 May 2024 15:54:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00A3E128807; Wed, 8 May 2024 15:54:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Gc0wP+GV" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 9AB2A84D30; Wed, 8 May 2024 15:54:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715183657; cv=none; b=ng4piZCcr9vojFtdunavv7qKCMahMnBW/tbw89UndgHq8Dt1vTOY7MpRh2xCEwezcO1tx3UVlKO4bvdeocTitbSWvz92MzCLKxuIWJbZfaTpAYuRYvqrSjw2B893j2gdjX3b0X06CfQMnjMnnNDYlrcFmUfXbuOgbEngW5DgyY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715183657; c=relaxed/simple; bh=Ew5dmPZ+RT1+yxAGE3521IVcxlD9Bk2UpRemXqAaf8A=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=V1L/g2OOUieB+xPFYXudzaCEQja7ot4rPq/P71HvuVWZuN/IpEjZ7gSGrFio/af58kETCb0q4py7P4cu8C3Ym2i6g1NZecaI7nJQx+PKTPglCZwIBCjj7iZfQYNTT6rwvFFCgxJOMUDjIXu6GV+TqCQs3BdwUYY9N/gDOxH4Thk= 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=Gc0wP+GV; arc=none smtp.client-ip=209.85.218.49 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 Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a59a0168c75so1204348466b.1; Wed, 08 May 2024 08:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715183654; x=1715788454; 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=cln0XHavbSCYQSNhIzrP83D1DhQuAwb+RqJP98JjwjE=; b=Gc0wP+GVK0Z8dlacjwC/88h+CkOykyuMbtn8Q5J4I6QpEUd5pvXiCIzRViAoU5ekU4 H0ZkztaFM+8vQIeVpt0J7zuVfetMZfL39BGUSEjTkNot9ImVHGy+jq2RnGl+1MFizY2y iNorXtar79tvnTnyiqa66MstmG8tt9cE+i+wbnxAtq40dMR8oCgA5G2lVTjpkVpsfyiV A6fNgcS6nMLnZbbx07MicYgvhNRyMuiJOJMI3WU2ms1jlXN74WlMn/x1++mCuwHJ6kvW XV1qI/eWBlANfpS9Gqv4+oic02FrggH+stzIE8I/3eNSrf3HV9OnydjnqbhRtLdQQ/uV N2xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715183654; x=1715788454; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cln0XHavbSCYQSNhIzrP83D1DhQuAwb+RqJP98JjwjE=; b=QC7oa63uuMvYRmh9LCpIpLlYEuxJ8IgrBpf7w5oLSWF4QsMht+EXmXCWGJoV2EDyAO zv+aiEKHYZJdJtSKVLG1fRCSnf/rzrH/4sOd8/evR1AGG+bZQaKPUB6DLekOQABhwy4v a4/QclkBwAK9ogCil5tvN+ZMlXRYyCYh6TfTqE/UO1/TNpmKHVHK4zesC59bboXTeYwx J6VfnxF1mf40CFfYB2b879dBb6gDhg1u0r1PhIv5wHCYj46hIdSi0kQxFwixfxYgAsYv 82Lyb/hm4pye5ElomsSOcYY52PTF2owgTAzwv2iV4DbNyRKPKZsnyNax0DNHfY0AcVZa zcEQ== X-Forwarded-Encrypted: i=1; AJvYcCUiGmZik+o4jcXpXL4IJeUZyqLc8fOva9XgB9OZHfteiSsI0xOG0e+98ZZda+hCEeI040fIZTZyW/kQm26PsNvv9j9HPzG2kEj1h9EYTaggA8BTSFzEtTmj1XJKF8tc9IaiSReH63GP X-Gm-Message-State: AOJu0YzuW4msY3q0RXQVT3CBRf4ehu21dVdnPonj8LLe4uAnMpsdU1Mn TA0/8lKrFxdigcsOo8379uhcshXsJxG03vHTrGV9RPVmlkY9nqrf X-Received: by 2002:a50:d78b:0:b0:572:7e9f:c124 with SMTP id 4fb4d7f45d1cf-5731d9b62b9mr2071405a12.9.1715183653814; Wed, 08 May 2024 08:54:13 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:82:7577:a3c8:644e:cd04:560a]) by smtp.gmail.com with ESMTPSA id v21-20020aa7d9d5000000b005700ef75274sm7699628eds.33.2024.05.08.08.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 08:54:13 -0700 (PDT) From: Vasileios Amoiridis To: jic23@kernel.org, lars@metafoo.de Cc: jagathjog1996@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Vasileios Amoiridis Subject: [PATCH] iio: imu: bmi323: Fix trigger notification in case of error Date: Wed, 8 May 2024 17:54:07 +0200 Message-Id: <20240508155407.139805-1-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In case of error in the bmi323_trigger_handler() function, the function exits without calling the iio_trigger_notify_done() which is responsible for informing the attached trigger that the process is done and in case there is a .reenable(), to call it. Fixes: 8a636db3aa57 ("iio: imu: Add driver for BMI323 IMU") Signed-off-by: Vasileios Amoiridis --- drivers/iio/imu/bmi323/bmi323_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c index 5d42ab9b176a..67d74a1a1b26 100644 --- a/drivers/iio/imu/bmi323/bmi323_core.c +++ b/drivers/iio/imu/bmi323/bmi323_core.c @@ -1391,7 +1391,7 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p) &data->buffer.channels, ARRAY_SIZE(data->buffer.channels)); if (ret) - return IRQ_NONE; + goto out; } else { for_each_set_bit(bit, indio_dev->active_scan_mask, BMI323_CHAN_MAX) { @@ -1400,13 +1400,14 @@ static irqreturn_t bmi323_trigger_handler(int irq, void *p) &data->buffer.channels[index++], BMI323_BYTES_PER_SAMPLE); if (ret) - return IRQ_NONE; + goto out; } } iio_push_to_buffers_with_timestamp(indio_dev, &data->buffer, iio_get_time_ns(indio_dev)); +out: iio_trigger_notify_done(indio_dev->trig); return IRQ_HANDLED; base-commit: dccb07f2914cdab2ac3a5b6c98406f765acab803 -- 2.25.1