diff options
author | Kai-Heng Feng <kai.heng.feng@canonical.com> | 2018-03-23 20:26:35 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-25 12:50:44 +0200 |
commit | a030501499b032bd218e1d01c07677bab6a0d53f (patch) | |
tree | 9924faca7e061bc17c1f7257606a8f307bd9b32d /Documentation | |
parent | USB: announce bcdDevice as well as idVendor, idProduct. (diff) | |
download | linux-a030501499b032bd218e1d01c07677bab6a0d53f.tar.xz linux-a030501499b032bd218e1d01c07677bab6a0d53f.zip |
usb: core: Copy parameter string correctly and remove superfluous null check
strsep() slices string, so the string gets copied by
param_set_copystring() at the end of quirks_param_set() is not the
original value.
Fix that by calling param_set_copystring() earlier.
The null check for val is unnecessary, the caller of quirks_param_set()
does not pass null string.
Remove the superfluous null check. This is found by Smatch.
Fixes: 027bd6cafd9a ("usb: core: Add "quirks" parameter for usbcore")
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions