Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3b724ca1 authored by Andreas Ruprecht's avatar Andreas Ruprecht Committed by Greg Kroah-Hartman
Browse files

Staging: iio/accel: Changed data type of val in store_measurement_mode to u8



The code in sca3000_store_measurement_mode() uses the variable val to
do bitwise operations with an int mask and or-s it into st->rx[0] which
is an entry in a u8 array (see sca3000.h).

This means up to now values larger than a u8 were silently ignored and
just the lower 8 bits counted into the value that was written into
st->rx[0]. This code will return -ERANGE if the value in buf was too
large to fit into a u8.

Signed-off-by: default avatarAndreas Ruprecht <rupran@einserver.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 359f9caa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment