Skip to content

Commit

Permalink
decnet: dn_dev: Remove an unnecessary label.
Browse files Browse the repository at this point in the history
Remove the unnecessary label from dn_dev_ioctl() and make its error
handling simpler to read.

Signed-off-by: Suraj Upadhyay <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Suraj-Upadhyay authored and kuba-moo committed Jul 16, 2020
1 parent 94d9f78 commit 514d095
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions net/decnet/dn_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg)
switch (cmd) {
case SIOCGIFADDR:
*((__le16 *)sdn->sdn_nodeaddr) = ifa->ifa_local;
goto rarok;
if (copy_to_user(arg, ifr, DN_IFREQ_SIZE))
ret = -EFAULT;
break;

case SIOCSIFADDR:
if (!ifa) {
Expand All @@ -485,10 +487,6 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg)
rtnl_unlock();

return ret;
rarok:
if (copy_to_user(arg, ifr, DN_IFREQ_SIZE))
ret = -EFAULT;
goto done;
}

struct net_device *dn_dev_get_default(void)
Expand Down

0 comments on commit 514d095

Please sign in to comment.