mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
Merge "usb: typec: Fix setting of invalid value of opmode"
This commit is contained in:
commit
95657f408c
1 changed files with 2 additions and 1 deletions
|
|
@ -1369,7 +1369,8 @@ void typec_set_pwr_opmode(struct typec_port *port,
|
|||
{
|
||||
struct device *partner_dev;
|
||||
|
||||
if (port->pwr_opmode == opmode)
|
||||
if ((port->pwr_opmode == opmode) || (opmode < TYPEC_PWR_MODE_USB) ||
|
||||
(opmode > TYPEC_PWR_MODE_PD))
|
||||
return;
|
||||
|
||||
port->pwr_opmode = opmode;
|
||||
|
|
|
|||
Loading…
Reference in a new issue