Skip to content

Commit f197902

Browse files
kmaincentkuba-moo
authored andcommitted
net: pse-pd: pd692x0: Replace __free macro with explicit kfree calls
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 <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/20251013-feature_pd692x0_reboot_keep_conf-v2-1-68ab082a93dd@bootlin.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e1f5bb1 commit f197902

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/net/pse-pd/pd692x0.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,9 +1200,9 @@ static void pd692x0_managers_free_pw_budget(struct pd692x0_priv *priv)
12001200

12011201
static int pd692x0_setup_pi_matrix(struct pse_controller_dev *pcdev)
12021202
{
1203-
struct pd692x0_manager *manager __free(kfree) = NULL;
12041203
struct pd692x0_priv *priv = to_pd692x0_priv(pcdev);
12051204
struct pd692x0_matrix port_matrix[PD692X0_MAX_PIS];
1205+
struct pd692x0_manager *manager;
12061206
int ret, nmanagers;
12071207

12081208
/* Should we flash the port matrix */
@@ -1216,7 +1216,7 @@ static int pd692x0_setup_pi_matrix(struct pse_controller_dev *pcdev)
12161216

12171217
ret = pd692x0_of_get_managers(priv, manager);
12181218
if (ret < 0)
1219-
return ret;
1219+
goto err_free_manager;
12201220

12211221
nmanagers = ret;
12221222
ret = pd692x0_register_managers_regulator(priv, manager, nmanagers);
@@ -1236,12 +1236,15 @@ static int pd692x0_setup_pi_matrix(struct pse_controller_dev *pcdev)
12361236
goto err_managers_req_pw;
12371237

12381238
pd692x0_of_put_managers(priv, manager, nmanagers);
1239+
kfree(manager);
12391240
return 0;
12401241

12411242
err_managers_req_pw:
12421243
pd692x0_managers_free_pw_budget(priv);
12431244
err_of_managers:
12441245
pd692x0_of_put_managers(priv, manager, nmanagers);
1246+
err_free_manager:
1247+
kfree(manager);
12451248
return ret;
12461249
}
12471250

0 commit comments

Comments
 (0)