USB: gadget: u_ether: Fix a configfs return code
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 15 Feb 2021 15:57:16 +0000 (15:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:29 +0000 (17:06 +0100)
commit50233f8220f030627d0e707b92666895902e0439
treee7cd8b2111d3c30f76ddb562088b66ba2505d54f
parent80091541a46b7d9cad70df974291dd544b837555
USB: gadget: u_ether: Fix a configfs return code

commit 650bf52208d804ad5ee449c58102f8dc43175573 upstream.

If the string is invalid, this should return -EINVAL instead of 0.

Fixes: 73517cf49bd4 ("usb: gadget: add RNDIS configfs options for class/subclass/protocol")
Cc: stable <stable@vger.kernel.org>
Acked-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YCqZ3P53yyIg5cn7@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/u_ether_configfs.h