lkml.org 
[lkml]   [2017]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/5] net/9p: Add a jump target in p9_client_walk()
From
Date
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
\
 
 \ /
  Last update: 2017-08-15 14:02    [W:0.062 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site