intel_th: pti: Do remove sysfs group on device removal
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 4 Mar 2016 14:10:20 +0000 (16:10 +0200)
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 8 Apr 2016 13:11:54 +0000 (16:11 +0300)
Right now, the PTI output driver forgets to clean up its sysfs group
when it gets removed. Fix this.

Reported-by: Alan Cox <alan.cox@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Laurent Fert <laurent.fert@intel.com>
drivers/hwtracing/intel_th/pti.c

index 57cbfdc..2692cad 100644 (file)
@@ -230,6 +230,7 @@ static int intel_th_pti_probe(struct intel_th_device *thdev)
 
 static void intel_th_pti_remove(struct intel_th_device *thdev)
 {
+       sysfs_remove_group(&thdev->dev.kobj, &pti_output_group);
 }
 
 static struct intel_th_driver intel_th_pti_driver = {