aboutsummaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorGao Feng <[email protected]>2016-10-25 22:26:09 +0800
committerDavid S. Miller <[email protected]>2016-10-29 14:51:42 -0400
commit0f16bc1355bab719958577b2e519a8cef1637b28 (patch)
tree5d78ddca868f0146e7ae379221afede07958eaa1 /net/switchdev/switchdev.c
parent93a205ee98a4881e8bf608e65562c19d45930a93 (diff)
driver: tun: Move tun check into the block of TUNSETIFF condition check
When cmd is TUNSETIFF and tun is not null, the original codes go ahead, then reach the default case of switch(cmd) and set the ret is -EINVAL. It is not clear for readers. Now move the tun check into the block of TUNSETIFF condition check, and return -EEXIST instead of -EINVAL when the tfile already owns one tun. Signed-off-by: Gao Feng <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions