diff mbox series

interconnect: qcom: bcm-voter: add a missing of_node_put()

Message ID 1619116570-13308-1-git-send-email-subbaram@codeaurora.org (mailing list archive)
State Not Applicable, archived
Headers show
Series interconnect: qcom: bcm-voter: add a missing of_node_put() | expand

Commit Message

Subbaraman Narayanamurthy April 22, 2021, 6:36 p.m. UTC
Add a missing of_node_put() in of_bcm_voter_get() to avoid the
reference leak.

Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Cc: stable@vger.kernel.org
---
 drivers/interconnect/qcom/bcm-voter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Matthias Kaehlcke April 22, 2021, 8:03 p.m. UTC | #1
On Thu, Apr 22, 2021 at 11:36:10AM -0700, Subbaraman Narayanamurthy wrote:
> Add a missing of_node_put() in of_bcm_voter_get() to avoid the
> reference leak.
> 
> Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
> Cc: stable@vger.kernel.org

nit: I think you would typically put tags like 'Cc' or 'Fixed' before
the 'Signed-off-by' tag.

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Subbaraman Narayanamurthy April 22, 2021, 11:46 p.m. UTC | #2
>> Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
>> Cc: stable@vger.kernel.org

> nit: I think you would typically put tags like 'Cc' or 'Fixed' before
> the 'Signed-off-by' tag.

Sure noted. Thanks.
diff mbox series

Patch

diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c
index 1cc565b..dd18cd8 100644
--- a/drivers/interconnect/qcom/bcm-voter.c
+++ b/drivers/interconnect/qcom/bcm-voter.c
@@ -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>
@@ -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);