aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorRami Rosen <ramirose@gmail.com>2012-11-22 22:58:10 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-23 14:24:46 -0500
commit9ce99cf6dc011a98ef8d64638d4353501de6f6c9 (patch)
tree819a4f03e488dd0c911909d71814be29ab483806 /drivers/net/tun.c
parent319b95b5f47e2ee67782f39fbb2c7fbd2c60c631 (diff)
tun: change tun_get_iff() prototype.
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>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index b01e8c0c422b..3bd9932a8cde 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1662,7 +1662,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
1662 return err; 1662 return err;
1663} 1663}
1664 1664
1665static int tun_get_iff(struct net *net, struct tun_struct *tun, 1665static void tun_get_iff(struct net *net, struct tun_struct *tun,
1666 struct ifreq *ifr) 1666 struct ifreq *ifr)
1667{ 1667{
1668 tun_debug(KERN_INFO, tun, "tun_get_iff\n"); 1668 tun_debug(KERN_INFO, tun, "tun_get_iff\n");
@@ -1671,7 +1671,6 @@ static int tun_get_iff(struct net *net, struct tun_struct *tun,
1671 1671
1672 ifr->ifr_flags = tun_flags(tun); 1672 ifr->ifr_flags = tun_flags(tun);
1673 1673
1674 return 0;
1675} 1674}
1676 1675
1677/* This is like a cut-down ethtool ops, except done via tun fd so no 1676/* This is like a cut-down ethtool ops, except done via tun fd so no
@@ -1847,9 +1846,7 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
1847 ret = 0; 1846 ret = 0;
1848 switch (cmd) { 1847 switch (cmd) {
1849 case TUNGETIFF: 1848 case TUNGETIFF:
1850 ret = tun_get_iff(current->nsproxy->net_ns, tun, &ifr); 1849 tun_get_iff(current->nsproxy->net_ns, tun, &ifr);
1851 if (ret)
1852 break;
1853 1850
1854 if (copy_to_user(argp, &ifr, ifreq_len)) 1851 if (copy_to_user(argp, &ifr, ifreq_len))
1855 ret = -EFAULT; 1852 ret = -EFAULT;