We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92682f3 commit befab3aCopy full SHA for befab3a
drivers/usb/typec/class.c
@@ -519,6 +519,7 @@ static void typec_altmode_release(struct device *dev)
519
typec_altmode_put_partner(alt);
520
521
altmode_id_remove(alt->adev.dev.parent, alt->id);
522
+ put_device(alt->adev.dev.parent);
523
kfree(alt);
524
}
525
@@ -568,6 +569,8 @@ typec_register_altmode(struct device *parent,
568
569
alt->adev.dev.type = &typec_altmode_dev_type;
570
dev_set_name(&alt->adev.dev, "%s.%u", dev_name(parent), id);
571
572
+ get_device(alt->adev.dev.parent);
573
+
574
/* Link partners and plugs with the ports */
575
if (!is_port)
576
typec_altmode_set_partner(alt);
0 commit comments