diff options
| author | Antoniu Miclaus <antoniu.miclaus@analog.com> | 2026-04-01 14:08:29 +0300 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-04-28 16:36:09 +0100 |
| commit | 5aba4f94b225617a55fed442a70329b2ee19c0a5 (patch) | |
| tree | 0329dc45d77b6a57d7879dc20307fa4f1a7ac54e /scripts/stackusage | |
| parent | 0d42e2c0bd6ceb89e44c6e065f9bdf9b1df3ef0c (diff) | |
iio: chemical: scd30: fix division by zero in write_raw
Add a zero check for val2 before using it as a divisor when setting the
sampling frequency. A user writing a zero fractional part to the
sampling_frequency sysfs attribute triggers a division by zero in the
kernel.
Fixes: 64b3d8b1b0f5 ("iio: chemical: scd30: add core driver")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
