Patch "mediatek: mt76: eeprom: fix missing of_node_put() in mt76_find_power_limits_node()" has been added to the 5.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mediatek: mt76: eeprom: fix missing of_node_put() in mt76_find_power_limits_node()

to the 5.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mediatek-mt76-eeprom-fix-missing-of_node_put-in-mt76.patch
and it can be found in the queue-5.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f48f5a4a424065f7aa4e832c8c568626e5224733
Author: Liang He <windhl@xxxxxxx>
Date:   Mon Jul 4 16:34:21 2022 +0800

    mediatek: mt76: eeprom: fix missing of_node_put() in mt76_find_power_limits_node()
    
    [ Upstream commit 3bd53ea02d77917c2314ec7be9e2d05be22f87d3 ]
    
    We should use of_node_put() for the reference 'np' returned by
    of_get_child_by_name() which will increase the refcount.
    
    Fixes: 22b980badc0f ("mt76: add functions for parsing rate power limits from DT")
    Signed-off-by: Liang He <windhl@xxxxxxx>
    Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
index a499861918fa..9bc8758573fc 100644
--- a/drivers/net/wireless/mediatek/mt76/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/eeprom.c
@@ -162,10 +162,13 @@ mt76_find_power_limits_node(struct mt76_dev *dev)
 		}
 
 		if (mt76_string_prop_find(country, dev->alpha2) ||
-		    mt76_string_prop_find(regd, region_name))
+		    mt76_string_prop_find(regd, region_name)) {
+			of_node_put(np);
 			return cur;
+		}
 	}
 
+	of_node_put(np);
 	return fallback;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux