This is a note to let you know that I've just added the patch titled usb: chipdea: core: fix return -EINVAL if request role is the same with current role to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-chipdea-core-fix-return-einval-if-request-role-is-the-same-with-current-role.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 3670de80678961eda7fa2220883fc77c16868951 Mon Sep 17 00:00:00 2001 From: Xu Yang <xu.yang_2@xxxxxxx> Date: Fri, 17 Mar 2023 14:15:15 +0800 Subject: usb: chipdea: core: fix return -EINVAL if request role is the same with current role From: Xu Yang <xu.yang_2@xxxxxxx> commit 3670de80678961eda7fa2220883fc77c16868951 upstream. It should not return -EINVAL if the request role is the same with current role, return non-error and without do anything instead. Fixes: a932a8041ff9 ("usb: chipidea: core: add sysfs group") cc: <stable@xxxxxxxxxxxxxxx> Acked-by: Peter Chen <peter.chen@xxxxxxxxxx> Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx> Link: https://lore.kernel.org/r/20230317061516.2451728-1-xu.yang_2@xxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/chipidea/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -977,9 +977,12 @@ static ssize_t role_store(struct device strlen(ci->roles[role]->name))) break; - if (role == CI_ROLE_END || role == ci->role) + if (role == CI_ROLE_END) return -EINVAL; + if (role == ci->role) + return n; + pm_runtime_get_sync(dev); disable_irq(ci->irq); ci_role_stop(ci); Patches currently in stable-queue which might be from xu.yang_2@xxxxxxx are queue-6.1/usb-typec-tcpm-fix-warning-when-handle-discover_identity-message.patch queue-6.1/usb-chipidea-core-fix-possible-concurrent-when-switch-role.patch queue-6.1/usb-chipdea-core-fix-return-einval-if-request-role-is-the-same-with-current-role.patch queue-6.1/usb-typec-tcpm-fix-create-duplicate-source-capabilities-file.patch