Skip to content

Commit 4fe171b

Browse files
zhengbin13dhowells
authored andcommitted
afs: Remove set but not used variable 'ret'
Fixes gcc '-Wunused-but-set-variable' warning: fs/afs/server.c: In function afs_install_server: fs/afs/server.c:157:6: warning: variable ret set but not used [-Wunused-but-set-variable] It is not used since commit d2ddc77 ("afs: Overhaul volume and server record caching and fileserver rotation") Reported-by: Hulk Robot <[email protected]> Signed-off-by: zhengbin <[email protected]> Signed-off-by: David Howells <[email protected]>
1 parent 51590df commit 4fe171b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/afs/server.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static struct afs_server *afs_install_server(struct afs_net *net,
151151
const struct afs_addr_list *alist;
152152
struct afs_server *server;
153153
struct rb_node **pp, *p;
154-
int ret = -EEXIST, diff;
154+
int diff;
155155

156156
_enter("%p", candidate);
157157

@@ -196,7 +196,6 @@ static struct afs_server *afs_install_server(struct afs_net *net,
196196
hlist_add_head_rcu(&server->addr6_link, &net->fs_addresses6);
197197

198198
write_sequnlock(&net->fs_addr_lock);
199-
ret = 0;
200199

201200
exists:
202201
afs_get_server(server, afs_server_trace_get_install);

0 commit comments

Comments
 (0)