OSDN Git Service

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 15:43:48 +0000 (16:43 +0100)
commite1ae0a8944c47f731b42a3ad12a2fa007288a979
treef626163653aee196275ed48966b7dd24d42ddcae
parentcbee45861fe8046c021faaab3f137cb629e649f9
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