Skip to content

Commit 514d095

Browse files
Suraj-Upadhyaykuba-moo
authored andcommitted
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: Suraj Upadhyay <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 94d9f78 commit 514d095

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

net/decnet/dn_dev.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,9 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg)
462462
switch (cmd) {
463463
case SIOCGIFADDR:
464464
*((__le16 *)sdn->sdn_nodeaddr) = ifa->ifa_local;
465-
goto rarok;
465+
if (copy_to_user(arg, ifr, DN_IFREQ_SIZE))
466+
ret = -EFAULT;
467+
break;
466468

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

487489
return ret;
488-
rarok:
489-
if (copy_to_user(arg, ifr, DN_IFREQ_SIZE))
490-
ret = -EFAULT;
491-
goto done;
492490
}
493491

494492
struct net_device *dn_dev_get_default(void)

0 commit comments

Comments
 (0)