[PATCH v1 1/3] net: mdio-mux: Delete unnecessary devm_kfree
From: Saravana Kannan
Date: Wed Aug 04 2021 - 17:43:47 EST
The whole point of devm_* APIs is that you don't have to undo them if you
are returning an error that's going to get propagated out of a probe()
function. So delete unnecessary devm_kfree() call in the error return path.
Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>
---
drivers/net/mdio/mdio-mux.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/mdio/mdio-mux.c b/drivers/net/mdio/mdio-mux.c
index 110e4ee85785..5b37284f54d6 100644
--- a/drivers/net/mdio/mdio-mux.c
+++ b/drivers/net/mdio/mdio-mux.c
@@ -181,7 +181,6 @@ int mdio_mux_init(struct device *dev,
}
dev_err(dev, "Error: No acceptable child buses found\n");
- devm_kfree(dev, pb);
err_pb_kz:
put_device(&parent_bus->dev);
err_parent_bus:
--
2.32.0.554.ge1b32706d8-goog