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

Commit d0559a2f authored by Ian Abbott's avatar Ian Abbott Committed by Johan Hovold
Browse files

USB: serial: ftdi_sio: only allow valid event_char values



The "event_char" device attribute value, when written, is interpreted as
an enable bit in bit 8, and an "event character" in bits 7 to 0.

Return an error -EINVAL for out-of-range values.  Use kstrtouint() to
parse the integer instead of the obsolete simple_strtoul().

Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent db924066
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