Hi Greg, > -----Original Message----- > From: Peter Chen <peter.chen@xxxxxxxxxx> > Sent: Friday, February 10, 2023 4:55 PM > To: Xu Yang <xu.yang_2@xxxxxxx> > Cc: gregkh@xxxxxxxxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>; Jun Li <jun.li@xxxxxxx> > Subject: [EXT] Re: [PATCH v2 1/3] usb: chipdea: core: don't return -EINVAL if request role is the same with current role > > Caution: EXT Email > > On 22-11-30 16:12:29, Xu Yang wrote: > > 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> > > Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx> > > Acked-by: Peter Chen <peter.chen@xxxxxxxxxx> Could you please add these three patches to your repo? Thanks, Xu Yang > > Peter > > > > --- > > changes since v1: > > - no change > > --- > > drivers/usb/chipidea/core.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c > > index 484b1cd23431..fcb175b22188 100644 > > --- a/drivers/usb/chipidea/core.c > > +++ b/drivers/usb/chipidea/core.c > > @@ -984,9 +984,12 @@ static ssize_t role_store(struct device *dev, > > 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); > > -- > > 2.34.1 > > > > -- > > Thanks, > Peter Chen