[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210817180841.3210484-2-saravanak@google.com>
Date: Tue, 17 Aug 2021 11:08:39 -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 net v2 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>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Acked-by: Marc Zyngier <maz@...nel.org>
Tested-by: Marc Zyngier <maz@...nel.org>
Acked-by: Kevin Hilman <khilman@...libre.com>
Tested-by: Kevin Hilman <khilman@...libre.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.33.0.rc1.237.g0d66db33f3-goog
Powered by blists - more mailing lists