diff options
author | Chris Diamand <chris.diamand@arm.com> | 2017-01-12 14:57:41 +0000 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-01-31 14:12:18 +0900 |
commit | 924b9111a14f2c913782597d9d0795c67f1a6898 (patch) | |
tree | cf0fb141a28d59409fc0a80dd7a418260b1dba93 /drivers/devfreq/governor_simpleondemand.c | |
parent | 566cf877a1fcb6d6dc0126b076aad062054c2637 (diff) |
PM / devfreq: Don't delete sysfs group twice
The 'userspace' governor adds a sysfs entry, which is removed when
the governor is changed, or the devfreq device is released. However,
when the latter occurs via device_unregister(), device_del() is
called first, which removes the sysfs entries recursively and deletes
the kobject.
This means we get an Oops when the governor calls
sysfs_remove_group() on the deleted kobject. Fix this by only doing
the call when kobj *hasn't* been kobject_del()'d.
Note that we can't just remove the call to sysfs_remove_group()
entirely - it's needed for when the governor is changed to one which
doesn't need a sysfs entry.
Signed-off-by: Chris Diamand <chris.diamand@arm.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq/governor_simpleondemand.c')
0 files changed, 0 insertions, 0 deletions