summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-03-04 11:15:26 +0100
committerIngo Molnar <mingo@kernel.org>2025-03-04 11:15:26 +0100
commit1b4c36f9b11e4a68f6174d1b6542b50cd29cddd2 (patch)
tree735b11a744d0acd18a1d7b7a4a5fa63fc6d23b92 /drivers/acpi
parentd0ba9bcf001c7907e4755b0e498f5ff9d1a228ef (diff)
parentf6bdaab79ee4228a143ee1b4cb80416d6ffc0c63 (diff)
downloadlinux-next-1b4c36f9b11e4a68f6174d1b6542b50cd29cddd2.tar.gz
linux-next-1b4c36f9b11e4a68f6174d1b6542b50cd29cddd2.zip
Merge branch 'x86/urgent' into x86/cpu, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/platform_profile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/acpi/platform_profile.c b/drivers/acpi/platform_profile.c
index fc92e43d0fe9..2ad53cc6aae5 100644
--- a/drivers/acpi/platform_profile.c
+++ b/drivers/acpi/platform_profile.c
@@ -417,8 +417,14 @@ static int profile_class_registered(struct device *dev, const void *data)
static umode_t profile_class_is_visible(struct kobject *kobj, struct attribute *attr, int idx)
{
- if (!class_find_device(&platform_profile_class, NULL, NULL, profile_class_registered))
+ struct device *dev;
+
+ dev = class_find_device(&platform_profile_class, NULL, NULL, profile_class_registered);
+ if (!dev)
return 0;
+
+ put_device(dev);
+
return attr->mode;
}