[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210804214333.927985-2-saravanak@google.com>
Date: Wed, 4 Aug 2021 14:43:30 -0700
From: Saravana Kannan <saravanak@...gle.com>
To: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: Saravana Kannan <saravanak@...gle.com>,
Marc Zyngier <maz@...nel.org>,
Neil Armstrong <narmstrong@...libre.com>,
Kevin Hilman <khilman@...libre.com>, kernel-team@...roid.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v1 1/3] net: mdio-mux: Delete unnecessary devm_kfree
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@...gle.com>
---
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
Powered by blists - more mailing lists