USB: serial: use kmemdup instead of kmalloc + memcpy
authorSlark Xiao <slark_xiao@163.com>
Wed, 22 Jun 2022 06:21:13 +0000 (14:21 +0800)
committerJohan Hovold <johan@kernel.org>
Wed, 22 Jun 2022 06:56:52 +0000 (08:56 +0200)
commit7828466cff6b38c2a8ea7cc43958e3abe04342c2
tree65b26b2ebab71b53ea74da7cc9a50af3ca20f4fd
parenta111daf0c53ae91e71fd2bfe7497862d14132e3e
USB: serial: use kmemdup instead of kmalloc + memcpy

For code neat purpose, we can use kmemdup to replace
kmalloc + memcpy.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/garmin_gps.c
drivers/usb/serial/opticon.c
drivers/usb/serial/sierra.c