]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/proc/proc_sysctl.c
Merge remote-tracking branch 'sysctl/master'
[karo-tx-linux.git] / fs / proc / proc_sysctl.c
index 1a77dbef226f00a2c41a5606b6e3c95fece6f5aa..1435ef5e94ca15de25637fb5e8e79f467e7465a1 100644 (file)
@@ -49,17 +49,11 @@ out:
 
 static struct ctl_table *find_in_table(struct ctl_table *p, struct qstr *name)
 {
-       int len;
        for ( ; p->procname; p++) {
-
-               if (!p->procname)
-                       continue;
-
-               len = strlen(p->procname);
-               if (len != name->len)
+               if (strlen(p->procname) != name->len)
                        continue;
 
-               if (memcmp(p->procname, name->name, len) != 0)
+               if (memcmp(p->procname, name->name, name->len) != 0)
                        continue;
 
                /* I have a match */
@@ -223,10 +217,6 @@ static int scan(struct ctl_table_header *head, ctl_table *table,
        for (; table->procname; table++, (*pos)++) {
                int res;
 
-               /* Can't do anything without a proc name */
-               if (!table->procname)
-                       continue;
-
                if (*pos < file->f_pos)
                        continue;