Skip to content

Commit 3a8839b

Browse files
zijun-hugregkh
authored andcommitted
usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes()
Device attribute group @usb3_hardware_lpm_attr_group is merged by add_power_attributes(), but it is not unmerged explicitly, fixed by unmerging it in remove_power_attributes(). Fixes: 655fe4e ("usbcore: add sysfs support to xHCI usb3 hardware LPM") Cc: [email protected] Signed-off-by: Zijun Hu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4f83cae commit 3a8839b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/core/sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ static int add_power_attributes(struct device *dev)
670670

671671
static void remove_power_attributes(struct device *dev)
672672
{
673+
sysfs_unmerge_group(&dev->kobj, &usb3_hardware_lpm_attr_group);
673674
sysfs_unmerge_group(&dev->kobj, &usb2_hardware_lpm_attr_group);
674675
sysfs_unmerge_group(&dev->kobj, &power_attr_group);
675676
}

0 commit comments

Comments
 (0)