summaryrefslogtreecommitdiff
path: root/drivers/usb/typec
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2023-12-12 11:32:33 +1000
committerDave Airlie <airlied@redhat.com>2023-12-12 11:32:33 +1000
commitc1ee197d64f49c9e2a6c8e6a168083c411c1362c (patch)
treeec8568a9d11ce55989c212efc4769cccc680964e /drivers/usb/typec
parenta60501d7c2d3e70b3545b9b96576628e369d8e85 (diff)
parenta39b6ac3781d46ba18193c9dbb2110f31e9bffe9 (diff)
Backmerge tag 'v6.7-rc5' into drm-next
Linux 6.7-rc5 Alex requested this for some amdkfd work relying on the symbols exports. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/usb/typec')
-rw-r--r--drivers/usb/typec/class.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
index 2e0451bd336e..16a670828dde 100644
--- a/drivers/usb/typec/class.c
+++ b/drivers/usb/typec/class.c
@@ -267,7 +267,7 @@ static void typec_altmode_put_partner(struct altmode *altmode)
if (!partner)
return;
- adev = &partner->adev;
+ adev = &altmode->adev;
if (is_typec_plug(adev->dev.parent)) {
struct typec_plug *plug = to_typec_plug(adev->dev.parent);
@@ -497,7 +497,8 @@ static void typec_altmode_release(struct device *dev)
{
struct altmode *alt = to_altmode(to_typec_altmode(dev));
- typec_altmode_put_partner(alt);
+ if (!is_typec_port(dev->parent))
+ typec_altmode_put_partner(alt);
altmode_id_remove(alt->adev.dev.parent, alt->id);
kfree(alt);