usb: avoid redundant allocation and free of memory
authorWeitao Hou <houweitaoo@gmail.com>
Thu, 23 May 2019 11:52:08 +0000 (19:52 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2019 07:53:24 +0000 (09:53 +0200)
commit086ebf92aa791b6cc8805decffca7b8898d99a4e
tree623da57e5879fac1bd3b057ea46958ee4ccbfd6c
parent6e9aed4ed4ca129510fcb1af495391d4717246d6
usb: avoid redundant allocation and free of memory

If usb is not attached, it's unnessary to allocate, copy
and free memory

Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/devio.c