Skip to content
Snippets Groups Projects
Commit 949bf79e authored by Felipe Balbi's avatar Felipe Balbi Committed by Marek Vasut
Browse files

usb: gadget: g_dnl: fix g_dnl_set_serialnumber()


instead of only copying if strlen(s) is less than 32 characters, let's
just copy at most 31 characters regardless of the size of
serial#. This will guarantee that we always have a serial number if
serial# environment variable is set to anything.

Note that without a proper serial number, USB Command Verifier fails
our test of Device Descriptor since we will claim to have a serial
number without really providing one when requested.

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 00e9d696
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment