Skip to content

Commit

Permalink
interconnect: qcom: bcm-voter: add a missing of_node_put()
Browse files Browse the repository at this point in the history
Add a missing of_node_put() in of_bcm_voter_get() to avoid the
reference leak.

Signed-off-by: Subbaraman Narayanamurthy <[email protected]>
Reviewed-by: Matthias Kaehlcke <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: 976daac ("interconnect: qcom: Consolidate interconnect RPMh support")
Signed-off-by: Georgi Djakov <[email protected]>
  • Loading branch information
Subbaraman Narayanamurthy authored and Georgi Djakov committed May 11, 2021
1 parent 6efb943 commit a005937
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/interconnect/qcom/bcm-voter.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
*/

#include <asm/div64.h>
Expand Down Expand Up @@ -205,6 +205,7 @@ struct bcm_voter *of_bcm_voter_get(struct device *dev, const char *name)
}
mutex_unlock(&bcm_voter_lock);

of_node_put(node);
return voter;
}
EXPORT_SYMBOL_GPL(of_bcm_voter_get);
Expand Down

0 comments on commit a005937

Please sign in to comment.