Skip to contentSkip to conversation

Patch "mdio: mux: fix device_node_continue.cocci warnings" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Apr 9, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

mdio: mux: fix device_node_continue.cocci warnings

to the 4.9-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:
mdio-mux-fix-device_node_continue.cocci-warnings.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Mon Apr 9 17:09:24 CEST 2018

From: Julia Lawall <[email protected]>
Date: Fri, 12 May 2017 22:54:23 +0800
Subject: mdio: mux: fix device_node_continue.cocci warnings

From: Julia Lawall <[email protected]>

[ Upstream commit 8c977f5a856a7276450ddf3a7b57b4a8815b63f9 ]

Device node iterators put the previous value of the index variable, so an explicit put causes a double put.

In particular, of_mdiobus_register can fail before doing anything interesting, so one could view it as a no-op from the reference count point of view.

Generated by: scripts/coccinelle/iterators/device_node_continue.cocci

---
 drivers/net/phy/mdio-mux.c |    1 -
 1 file changed, 1 deletion(-)
drivers/net/phy/mdio-mux.c +0 -1
@@ -169,7 +169,6 @@ int mdio_mux_init(struct device *dev,
 		if (r) {
 			mdiobus_free(cb->mii_bus);
 			devm_kfree(dev, cb);
-			of_node_put(child_bus_node);
 		} else {
 			cb->next = pb->children;
 			pb->children = cb;

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/mdio-mux-fix-device_node_continue.cocci-warnings.patch