summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2011-06-21 14:34:20 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2011-06-21 14:34:20 +1000
commite41a28afe1d7fa4d3d1ed1d2e08e7eab993bcfa3 (patch)
tree147cfe8fd51f5188798a19908a78dbfda84e63c4 /fs
parent1edaac915125b9b369184916980aaf5ba018943e (diff)
parentc2f5631aceb700224d0cfe0465cee18df564a29e (diff)
Merge remote-tracking branch 'sysctl/master'
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/proc_sysctl.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index d167de365a8d..16b54369e58b 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -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;