diff options
Diffstat (limited to 'net/econet')
-rw-r--r-- | net/econet/af_econet.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index 13992e1d272..f180371fa41 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c @@ -661,8 +661,10 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg) err = 0; switch (cmd) { case SIOCSIFADDR: - if (!capable(CAP_NET_ADMIN)) - return -EPERM; + if (!capable(CAP_NET_ADMIN)) { + err = -EPERM; + break; + } edev = dev->ec_ptr; if (edev == NULL) { |