From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Kittisak Boonmapa <goorock.goopop@gmail.com>
Cc: jic23@kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, dlechner@baylibre.com,
nuno.sa@analog.com, andy@kernel.org,
srinivas.pandruvada@linux.intel.com,
sakari.ailus@linux.intel.com, joshua.crofts1@gmail.com
Subject: Re: [PATCH] iio: hid-sensors: Fix poll_value sign check before msleep_interruptible
Date: Wed, 1 Jul 2026 18:49:13 +0300 [thread overview]
Message-ID: <akU2-c370kPmrzX2@ashevche-desk.local> (raw)
In-Reply-To: <20260701154319.23497-1-goorock.goopop@gmail.com>
On Wed, Jul 01, 2026 at 10:43:19PM +0700, Kittisak Boonmapa wrote:
> hid_sensor_read_poll_value() returns -EINVAL when the HID descriptor
> does not contain a Report Interval feature field.
>
> _hid_sensor_power_state() currently treats any non-zero value as a
> valid delay and passes it to msleep_interruptible(). Since
> msleep_interruptible() takes an unsigned int, negative values are
> converted into very large delays.
>
> Only sleep when poll_value is positive.
Makes sense.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-07-01 15:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 15:43 [PATCH] iio: hid-sensors: Fix poll_value sign check before msleep_interruptible Kittisak Boonmapa
2026-07-01 15:49 ` Andy Shevchenko [this message]
2026-07-01 16:22 ` Joshua Crofts
2026-07-01 17:42 ` srinivas pandruvada
2026-07-01 17:47 ` Jonathan Cameron
2026-07-01 17:59 ` srinivas pandruvada
2026-07-01 18:59 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=akU2-c370kPmrzX2@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=goorock.goopop@gmail.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=sakari.ailus@linux.intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.