commit | d0559a2f294c9b50d7795a8362931f0db8953de1 | [log] [tgz] |
---|---|---|
author | Ian Abbott <abbotti@mev.co.uk> | Wed Mar 08 16:03:00 2017 +0000 |
committer | Johan Hovold <johan@kernel.org> | Mon Mar 13 16:55:41 2017 +0100 |
tree | 0c3943246b8cd960371318dcf2bb9130a06feae0 | |
parent | db9240662a44e1b7781c8dbf35631bcec7a369c6 [diff] |
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: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Johan Hovold <johan@kernel.org>