aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/platform_profile.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-03-04 11:19:21 +0100
committerIngo Molnar <mingo@kernel.org>2025-03-04 11:19:21 +0100
commitcfdaa618defc5ebe1ee6aa5bd40a7ccedffca6de (patch)
treefba004535821850f0d10cc4deac3885545083f0c /drivers/acpi/platform_profile.c
parentx86/ia32: Leave NULL selector values 0~3 unchanged (diff)
parent<linux/sizes.h>: Cover all possible x86 CPU cache sizes (diff)
downloadlinux-cfdaa618defc5ebe1ee6aa5bd40a7ccedffca6de.tar.gz
linux-cfdaa618defc5ebe1ee6aa5bd40a7ccedffca6de.zip
Merge branch 'x86/cpu' into x86/asm, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/acpi/platform_profile.c')
-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;
}