aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/typec
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-03 13:02:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-03 13:02:29 +0100
commite681a9d2050cdcaf24adeabc9f1aea6cff94be22 (patch)
tree5dccb613fdadb3f792bfedc0c224581d1b3e7a73 /drivers/usb/typec
parentusb: dwc2: Simplify a bitmap declaration (diff)
parentLinux 5.16-rc8 (diff)
downloadwireguard-linux-e681a9d2050cdcaf24adeabc9f1aea6cff94be22.tar.xz
wireguard-linux-e681a9d2050cdcaf24adeabc9f1aea6cff94be22.zip
Merge 5.16-rc8 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec')
-rw-r--r--drivers/usb/typec/ucsi/ucsi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 9d6b7e02d6ef..f0c2fa19f3e0 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1164,7 +1164,9 @@ static int ucsi_register_port(struct ucsi *ucsi, int index)
ret = 0;
}
- if (UCSI_CONSTAT_PWR_OPMODE(con->status.flags) == UCSI_CONSTAT_PWR_OPMODE_PD) {
+ if (con->partner &&
+ UCSI_CONSTAT_PWR_OPMODE(con->status.flags) ==
+ UCSI_CONSTAT_PWR_OPMODE_PD) {
ucsi_get_src_pdos(con);
ucsi_check_altmodes(con);
}