]> err.no Git - linux-2.6/commitdiff
[NETROM/AX.25/ROSE]: Remove useless tests
authorRalf Baechle <ralf@linux-mips.org>
Mon, 12 Sep 2005 21:23:52 +0000 (14:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Sep 2005 21:23:52 +0000 (14:23 -0700)
Remove error tests that have already been performed by the caller.

Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ax25/af_ax25.c
net/netrom/af_netrom.c
net/rose/af_rose.c

index 17f192b778677ebe79bd90a30084fbb7d46e4fd4..9c487311e0a9e7a88354f84e0b75a1fb8aef6b57 100644 (file)
@@ -1700,11 +1700,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
        }
 
        case SIOCGSTAMP:
-               if (sk != NULL) {
-                       res = sock_get_timestamp(sk, argp);
-                       break;
-               }
-               res = -EINVAL;
+               res = sock_get_timestamp(sk, argp);
                break;
 
        case SIOCAX25ADDUID:    /* Add a uid to the uid/call map table */
index f4578c759ffcc3350ebbd708c7f0a2ffef52c587..02b1ab52dbbf1b363174faf7111d61a6156304e6 100644 (file)
@@ -1187,9 +1187,7 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
        }
 
        case SIOCGSTAMP:
-               ret = -EINVAL;
-               if (sk != NULL)
-                       ret = sock_get_timestamp(sk, argp);
+               ret = sock_get_timestamp(sk, argp);
                release_sock(sk);
                return ret;
 
index 3077878ed4f09fdc1a9a1bcf0b1303084f098641..977f99a9cfc0f8ccf94efc49a76f8fbc95b2b656 100644 (file)
@@ -1256,9 +1256,7 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
        }
 
        case SIOCGSTAMP:
-               if (sk != NULL) 
-                       return sock_get_timestamp(sk, (struct timeval __user *)argp);
-               return -EINVAL;
+               return sock_get_timestamp(sk, (struct timeval __user *)argp);
 
        case SIOCGIFADDR:
        case SIOCSIFADDR: