Merge tag 'acpi-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fix from Rafael Wysocki: "Fix a memory leak in the ACPI platform_profile driver (Kurt Borja)" * tag 'acpi-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: platform_profile: Fix memory leak in profile_class_is_visible()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user