Commit 514d0952 authored by Suraj Upadhyay's avatar Suraj Upadhyay Committed by Jakub Kicinski

decnet: dn_dev: Remove an unnecessary label.

Remove the unnecessary label from dn_dev_ioctl() and make its error
handling simpler to read.
Signed-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 94d9f78f
...@@ -462,7 +462,9 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg) ...@@ -462,7 +462,9 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg)
switch (cmd) { switch (cmd) {
case SIOCGIFADDR: case SIOCGIFADDR:
*((__le16 *)sdn->sdn_nodeaddr) = ifa->ifa_local; *((__le16 *)sdn->sdn_nodeaddr) = ifa->ifa_local;
goto rarok; if (copy_to_user(arg, ifr, DN_IFREQ_SIZE))
ret = -EFAULT;
break;
case SIOCSIFADDR: case SIOCSIFADDR:
if (!ifa) { if (!ifa) {
...@@ -485,10 +487,6 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg) ...@@ -485,10 +487,6 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg)
rtnl_unlock(); rtnl_unlock();
return ret; return ret;
rarok:
if (copy_to_user(arg, ifr, DN_IFREQ_SIZE))
ret = -EFAULT;
goto done;
} }
struct net_device *dn_dev_get_default(void) struct net_device *dn_dev_get_default(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment