Commit e60284b
usb: gadget: f_uac2: fix non-newline-terminated function name
Most writes to configfs handle an optional newline, but do not require
it. By using the number of bytes written as the limit for scnprintf()
it is guaranteed that the final character in the buffer will be
overwritten.
This is expected if it is a newline but is undesirable when a string is
written "as-is" (as libusbgx does, for example).
Update the store function to strip an optional newline, matching the
behaviour of usb_string_copy().
Signed-off-by: John Keeping <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 4920d37 commit e60284b
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2063 | 2063 | | |
2064 | 2064 | | |
2065 | 2065 | | |
2066 | | - | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
2067 | 2070 | | |
2068 | 2071 | | |
2069 | 2072 | | |
| |||
0 commit comments