MLK-23349-6 usb: chipdea: don't return -EINVAL if request role is the same with current role
It should not return -EINVAL if the request role is the same with current role, return non-error and without do anything instead. Reviewed-by: Jun Li <jun.li@nxp.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
40688bff75
commit
3800732005
|
@ -980,9 +980,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);
|
||||
|
|
Loading…
Reference in New Issue