Skip to content

Commit

Permalink
tun: change tun_get_iff() prototype.
Browse files Browse the repository at this point in the history
This patch changes tun_get_iff() prototype to return void as it never fails.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rami Rosen authored and David S. Miller committed Nov 23, 2012
1 parent 319b95b commit 9ce99cf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
return err;
}

static int tun_get_iff(struct net *net, struct tun_struct *tun,
static void tun_get_iff(struct net *net, struct tun_struct *tun,
struct ifreq *ifr)
{
tun_debug(KERN_INFO, tun, "tun_get_iff\n");
Expand All @@ -1671,7 +1671,6 @@ static int tun_get_iff(struct net *net, struct tun_struct *tun,

ifr->ifr_flags = tun_flags(tun);

return 0;
}

/* This is like a cut-down ethtool ops, except done via tun fd so no
Expand Down Expand Up @@ -1847,9 +1846,7 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
ret = 0;
switch (cmd) {
case TUNGETIFF:
ret = tun_get_iff(current->nsproxy->net_ns, tun, &ifr);
if (ret)
break;
tun_get_iff(current->nsproxy->net_ns, tun, &ifr);

if (copy_to_user(argp, &ifr, ifreq_len))
ret = -EFAULT;
Expand Down

0 comments on commit 9ce99cf

Please sign in to comment.