]> git.itanic.dy.fi Git - linux-stable/commit
net: tun: rebuild error handling in tun_get_user
authorChuang Wang <nashuiliang@gmail.com>
Thu, 10 Nov 2022 07:31:25 +0000 (15:31 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Nov 2022 09:52:07 +0000 (09:52 +0000)
commitab00af85d2f886a8e4ace1342d9cc2b232eab6a8
treea27c0b40bf44fbcd6a710583dc8f7c63fe76b712
parentb548b17a93fd18357a5a6f535c10c1e68719ad32
net: tun: rebuild error handling in tun_get_user

The error handling in tun_get_user is very scattered.
This patch unifies error handling, reduces duplication of code, and
makes the logic clearer.

Signed-off-by: Chuang Wang <nashuiliang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c