* [PATCH v5] iio: imu: inv_icm45600: Initializes inv_icm45600_buffer_postdisable sleep
@ 2025-11-07 13:49 Remi Buisson via B4 Relay
2025-11-09 16:56 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Remi Buisson via B4 Relay @ 2025-11-07 13:49 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá,
Andy Shevchenko, Remi Buisson
Cc: Jonathan Cameron, linux-iio, linux-kernel, Andy Shevchenko
From: Remi Buisson <remi.buisson@tdk.com>
The sleep variable in inv_icm45600_buffer_postdisable() could be used without
being assigned in case of error. It must be initialized to 0 by default.
Fixes: 06674a72cf7a ("iio: imu: inv_icm45600: add buffer support in iio devices")
Closes: https://lore.kernel.org/linux-iio/aPi6Xw-ZoUkW76zR@stanley.mountain/
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Remi Buisson <remi.buisson@tdk.com>
---
Changes in v5:
- Adding parenthesis to function name in commit message
- Adding Reviewed-by tag
- Link to v4: https://lore.kernel.org/r/20251107-icm45600_fix_buffer_sleep_init-v4-1-5648fbfb57ad@tdk.com
Changes in v4:
- Add space in closse tag in commit message
- Remove extra blank line in commit message
- Link to v3: https://lore.kernel.org/r/20251106-icm45600_fix_buffer_sleep_init-v3-1-ea3af68a3e61@tdk.com
Changes in v3:
- Fix commit message: fix and closes moved to SoB
- Fix assignement of sleep variable after declaration.
- Link to v2: https://lore.kernel.org/r/20251031-icm45600_fix_buffer_sleep_init-v2-1-5cdc04e1bcba@tdk.com
Changes in v2:
- Moving pacth description from cover-letter to single commit
- Link to v1: https://lore.kernel.org/r/20251031-icm45600_fix_buffer_sleep_init-v1-1-924efbb165e8@tdk.com
---
drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c b/drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
index 2efcc177f9d60a6a2509e448c0ddaf4b9e1fd755..2b9ea317385ceb680f013c4c1b2a6a74fbe5d7e7 100644
--- a/drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
+++ b/drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
@@ -370,6 +370,7 @@ static int inv_icm45600_buffer_postdisable(struct iio_dev *indio_dev)
return -EINVAL;
}
+ sleep = 0;
scoped_guard(mutex, &st->lock)
ret = _inv_icm45600_buffer_postdisable(st, sensor, watermark, &sleep);
---
base-commit: 70437bbd7529e9860fb7f0c92a89e0e6abaa994e
change-id: 20251031-icm45600_fix_buffer_sleep_init-8062f6e07f84
Best regards,
--
Remi Buisson <remi.buisson@tdk.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v5] iio: imu: inv_icm45600: Initializes inv_icm45600_buffer_postdisable sleep
2025-11-07 13:49 [PATCH v5] iio: imu: inv_icm45600: Initializes inv_icm45600_buffer_postdisable sleep Remi Buisson via B4 Relay
@ 2025-11-09 16:56 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2025-11-09 16:56 UTC (permalink / raw)
To: Remi Buisson via B4 Relay
Cc: remi.buisson, David Lechner, Nuno Sá,
Andy Shevchenko, Jonathan Cameron, linux-iio, linux-kernel,
Andy Shevchenko
On Fri, 07 Nov 2025 13:49:56 +0000
Remi Buisson via B4 Relay <devnull+remi.buisson.tdk.com@kernel.org> wrote:
> From: Remi Buisson <remi.buisson@tdk.com>
>
> The sleep variable in inv_icm45600_buffer_postdisable() could be used without
> being assigned in case of error. It must be initialized to 0 by default.
>
> Fixes: 06674a72cf7a ("iio: imu: inv_icm45600: add buffer support in iio devices")
> Closes: https://lore.kernel.org/linux-iio/aPi6Xw-ZoUkW76zR@stanley.mountain/
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> Signed-off-by: Remi Buisson <remi.buisson@tdk.com>
Lots of versions. Ah well. this is effectively the one b4 picked up.
J
> ---
> Changes in v5:
> - Adding parenthesis to function name in commit message
> - Adding Reviewed-by tag
> - Link to v4: https://lore.kernel.org/r/20251107-icm45600_fix_buffer_sleep_init-v4-1-5648fbfb57ad@tdk.com
>
> Changes in v4:
> - Add space in closse tag in commit message
> - Remove extra blank line in commit message
> - Link to v3: https://lore.kernel.org/r/20251106-icm45600_fix_buffer_sleep_init-v3-1-ea3af68a3e61@tdk.com
>
> Changes in v3:
> - Fix commit message: fix and closes moved to SoB
> - Fix assignement of sleep variable after declaration.
> - Link to v2: https://lore.kernel.org/r/20251031-icm45600_fix_buffer_sleep_init-v2-1-5cdc04e1bcba@tdk.com
>
> Changes in v2:
> - Moving pacth description from cover-letter to single commit
> - Link to v1: https://lore.kernel.org/r/20251031-icm45600_fix_buffer_sleep_init-v1-1-924efbb165e8@tdk.com
> ---
> drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c b/drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
> index 2efcc177f9d60a6a2509e448c0ddaf4b9e1fd755..2b9ea317385ceb680f013c4c1b2a6a74fbe5d7e7 100644
> --- a/drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
> +++ b/drivers/iio/imu/inv_icm45600/inv_icm45600_buffer.c
> @@ -370,6 +370,7 @@ static int inv_icm45600_buffer_postdisable(struct iio_dev *indio_dev)
> return -EINVAL;
> }
>
> + sleep = 0;
> scoped_guard(mutex, &st->lock)
> ret = _inv_icm45600_buffer_postdisable(st, sensor, watermark, &sleep);
>
>
> ---
> base-commit: 70437bbd7529e9860fb7f0c92a89e0e6abaa994e
> change-id: 20251031-icm45600_fix_buffer_sleep_init-8062f6e07f84
>
> Best regards,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-09 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-07 13:49 [PATCH v5] iio: imu: inv_icm45600: Initializes inv_icm45600_buffer_postdisable sleep Remi Buisson via B4 Relay
2025-11-09 16:56 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®