Messages in this thread Patch in this message | | | Subject | [PATCH 3/5] net/9p: Add a jump target in p9_client_walk() | From | SF Markus Elfring <> | Date | Tue, 15 Aug 2017 14:01:11 +0200 |
| |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Tue, 15 Aug 2017 10:07:22 +0200
Replace a variable assignment by a goto statement so that an extra check will be avoided at the end of this function.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- net/9p/client.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c index 2ca55d4b0b7d..6c2fc796edfb 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -1237,12 +1237,11 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, uint16_t nwname, clunk_fid: kfree(wqids); p9_client_clunk(fid); - fid = NULL; - + goto exit; error: if (fid && (fid != oldfid)) p9_fid_destroy(fid); - +exit: return ERR_PTR(err); } EXPORT_SYMBOL(p9_client_walk); -- 2.14.0
| |