[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250829-feature_poe_permanent_conf-v2-1-8bb6f073ec23@bootlin.com>
Date: Fri, 29 Aug 2025 18:28:43 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Jiri Pirko <jiri@...nulli.us>, Simon Horman <horms@...nel.org>,
Jonathan Corbet <corbet@....net>
Cc: kernel@...gutronix.de, Dent Project <dentproject@...uxfoundation.org>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
linux-doc@...r.kernel.org,
"Kory Maincent (Dent Project)" <kory.maincent@...tlin.com>
Subject: [PATCH net-next v2 1/4] net: pse-pd: pd692x0: Replace __free macro
with explicit kfree calls
From: Kory Maincent (Dent Project) <kory.maincent@...tlin.com>
Replace __free(kfree) with explicit kfree() calls to follow the net
subsystem policy of avoiding automatic cleanup macros as described in
the documentation.
Signed-off-by: Kory Maincent <kory.maincent@...tlin.com>
---
Changes in v2:
- New patch
---
drivers/net/pse-pd/pd692x0.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/pse-pd/pd692x0.c b/drivers/net/pse-pd/pd692x0.c
index f4e91ba64a666..055e925c853ef 100644
--- a/drivers/net/pse-pd/pd692x0.c
+++ b/drivers/net/pse-pd/pd692x0.c
@@ -1200,9 +1200,9 @@ static void pd692x0_managers_free_pw_budget(struct pd692x0_priv *priv)
static int pd692x0_setup_pi_matrix(struct pse_controller_dev *pcdev)
{
- struct pd692x0_manager *manager __free(kfree) = NULL;
struct pd692x0_priv *priv = to_pd692x0_priv(pcdev);
struct pd692x0_matrix port_matrix[PD692X0_MAX_PIS];
+ struct pd692x0_manager *manager;
int ret, nmanagers;
/* Should we flash the port matrix */
@@ -1216,7 +1216,7 @@ static int pd692x0_setup_pi_matrix(struct pse_controller_dev *pcdev)
ret = pd692x0_of_get_managers(priv, manager);
if (ret < 0)
- return ret;
+ goto err_free_manager;
nmanagers = ret;
ret = pd692x0_register_managers_regulator(priv, manager, nmanagers);
@@ -1236,12 +1236,15 @@ static int pd692x0_setup_pi_matrix(struct pse_controller_dev *pcdev)
goto err_managers_req_pw;
pd692x0_of_put_managers(priv, manager, nmanagers);
+ kfree(manager);
return 0;
err_managers_req_pw:
pd692x0_managers_free_pw_budget(priv);
err_of_managers:
pd692x0_of_put_managers(priv, manager, nmanagers);
+err_free_manager:
+ kfree(manager);
return ret;
}
--
2.43.0
Powered by blists - more mailing lists