usb: cdns3: remove redundant assignment to ret on error exit path
authorColin Ian King <colin.king@canonical.com>
Mon, 2 Sep 2019 18:43:34 +0000 (19:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Sep 2019 13:46:46 +0000 (15:46 +0200)
commit4d2233ecec8e5e2ac3e2efd5bf8fdfaf1dab30d9
tree6c08be9642b8e335bfbbe30c9d1433d0c4bade1f
parent35af2445dc306403254a181507b390ec9eb725d5
usb: cdns3: remove redundant assignment to ret on error exit path

In the case where an allocation fails for priv_ep ret is
assigned -ENOMEM and the code exits via the exit path 'err'.
The exit path returns -ENOMEM without using variable ret, so
the assingment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190902184334.27406-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/gadget.c