diff options
author | Florian Zumbiehl <florz@florz.de> | 2007-07-31 02:48:23 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-31 11:28:22 +0200 |
commit | 86c1dcfc96a778433ebc6e9b1d3e80a126cb80f2 (patch) | |
tree | ad6f69355b76974d2a80ab56313225aa557eb459 /drivers/net/pppoe.c | |
parent | [IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses. (diff) | |
download | linux-86c1dcfc96a778433ebc6e9b1d3e80a126cb80f2.tar.xz linux-86c1dcfc96a778433ebc6e9b1d3e80a126cb80f2.zip |
[PPPoX/E]: return ENOTTY on unknown ioctl requests
here another patch for the PPPoX/E code that makes sure that ENOTTY is
returned for unknown ioctl requests rather than 0 (and removes another
unneeded initializer which I didn't bother creating a separate patch for).
Signed-off-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pppoe.c')
-rw-r--r-- | drivers/net/pppoe.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index 6f98834e6ace..f75aeaaf861f 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c @@ -664,8 +664,8 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, { struct sock *sk = sock->sk; struct pppox_sock *po = pppox_sk(sk); - int val = 0; - int err = 0; + int val; + int err; switch (cmd) { case PPPIOCGMRU: @@ -754,8 +754,9 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, err = 0; break; - default:; - }; + default: + err = -ENOTTY; + } return err; } |