decnet: dn_dev: Remove an unnecessary label.
Subsystems (3)
PATCH 1/1 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]>
--- net/decnet/dn_dev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
net/decnet/dn_dev.c +3 -5
@@ -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) {
@@ -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 )
Signature · 1 line
2.17.1
Quoted 13 lines · Suraj Upadhyay
Remove the unnecessary label from
dn_dev_ioctl()and make its error handling simpler to read.Signed-off-by Suraj Upadhyay <[email protected]>--- net/decnet/dn_dev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)net/decnet/dn_dev.c +0
-0
net/decnet/dn_dev.c int dn_dev_ioctl(unsigned int cmd, void __user *arg) · line 467
Quoted 7 lines
net/decnet/dn_dev.c +3
-1@@ -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 ;
The indentation on break does not look correct.
julia
Quoted 18 lines
net/decnet/dn_dev.c +0
-5case SIOCSIFADDR :if (!ifa) {@@ -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 ) --2.17.1
Quoted 27 lines · Julia Lawall
Quoted 13 lines · Suraj Upadhyay
Remove the unnecessary label from
dn_dev_ioctl()and make its error handling simpler to read.Signed-off-by Suraj Upadhyay <[email protected]>--- net/decnet/dn_dev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)net/decnet/dn_dev.c +0
-0net/decnet/dn_dev.c int dn_dev_ioctl(unsigned int cmd, void __user *arg) · line 467
Quoted 7 lines
net/decnet/dn_dev.c +3
-1@@ -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 ;The indentation on break does not look correct.
Quoted 1 line
julia
Thanks for your response and advise, sent a v2 patch.
Suraj Upadhyay.
Quoted 18 lines
Quoted 18 lines
net/decnet/dn_dev.c +0
-5case SIOCSIFADDR :if (!ifa) {@@ -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 ) --2.17.1