Skip to content

Commit 808337b

Browse files
Yang Likuba-moo
authored andcommitted
net: tun: Remove redundant assignment to ret
Variable 'ret' is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: drivers/net/tun.c:3008:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 65ad85f commit 808337b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/net/tun.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,6 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
30083008
return open_related_ns(&net->ns, get_net_ns);
30093009
}
30103010

3011-
ret = 0;
30123011
rtnl_lock();
30133012

30143013
tun = tun_get(tfile);

0 commit comments

Comments
 (0)