p9_client_destroy will catch that trans and put it when p9_client_create fails
This was brought up when reviewing an alternative implementation of the
previous patch [1]
Link: https://lkml.kernel.org/r/[email protected] [1]
Fixes: 3ff51294a055 ("9p: p9_client_create: use p9_client_destroy on failure")
Signed-off-by: Dominique Martinet <[email protected]>
---
net/9p/client.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index cf2d5b60b61b..693e06213a04 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -212,8 +212,6 @@ static int parse_opts(char *opts, struct p9_client *clnt)
}
free_and_return:
- if (ret)
- v9fs_put_trans(clnt->trans_mod);
kfree(tmp_options);
return ret;
}
--
2.35.1