[PATCH V4] net: dsa: mt7530: Add of_node_put() before break and return statements

2020-08-24 Thread Sumera Priyadarsini
leak in mt7530.c by inserting of_node_put() before the break and return statements. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini --- Changes in v2: Add another of_node_put() in for_each_child_of_node() as pointed out by Andrew. Changes in v3: - Correct syntax

[PATCH V3] net: dsa: Add of_node_put() before break and return statements

2020-08-23 Thread Sumera Priyadarsini
--- Signed-off-by: Sumera Priyadarsini Signed-off-by: Sumera Priyadarsini --- drivers/net/dsa/mt7530.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 8dcb8a49ab67..4b4701c69fe1 100644 --- a/drivers/net/dsa

[PATCH V2] net: dsa: Add of_node_put() before break statement

2020-08-23 Thread Sumera Priyadarsini
leak in mt7530.c by inserting of_node_put() before the break statement. Issue found with Coccinelle. --- Changes in v2: Add another of_node_put() in for_each_child_of_node() as pointed out by Andrew. --- Signed-off-by: Sumera Priyadarsini --- drivers/net/dsa/mt7530.c | 2 ++ 1 file

[PATCH] net: dsa: Add of_node_put() before break statement

2020-08-23 Thread Sumera Priyadarsini
leak in mt7530.c by inserting of_node_put() before the break statement. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini --- drivers/net/dsa/mt7530.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 8dcb8a49ab67

[PATCH] net: ocelot: Add of_node_put() before return statement

2020-08-23 Thread Sumera Priyadarsini
potential memory leak in felix.c by inserting of_node_put() before the return statement. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini --- drivers/net/dsa/ocelot/felix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c

[PATCH] net: gianfar: Add of_node_put() before goto statement

2020-08-18 Thread Sumera Priyadarsini
memory leak in gianfar.c by inserting of_node_put() before the goto statement. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini --- drivers/net/ethernet/freescale/gianfar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale