Merge "cpuidle: governors: qcom-lpm: Add missing kobject_put()"

This commit is contained in:
qctecmdr 2022-12-17 15:20:07 -08:00 committed by Gerrit - the friendly Code Review server
commit 918b88d534

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/cpu.h>
@ -106,8 +107,10 @@ int create_cluster_sysfs_nodes(struct lpm_cluster *cluster)
struct qcom_cluster_node *d;
d = devm_kzalloc(cluster->dev, sizeof(*d), GFP_KERNEL);
if (!d)
if (!d) {
kobject_put(cluster->dev_kobj);
return -ENOMEM;
}
d->state_idx = i;
d->cluster = cluster;