Documentation: make configfs example code simpler, clearer

If "p" is NULL then it will cause an oops when we pass it to
simple_strtoul(). In this case "p" can not be NULL so I removed the
check. I also changed the check a little to make it more explicit that
we are testing whether p points to the NUL char.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Dan Carpenter and committed by Linus Torvalds 09c9feb9 2b35f4d9

+1 -1
+1 -1
Documentation/filesystems/configfs/configfs_example_explicit.c
··· 89 char *p = (char *) page; 90 91 tmp = simple_strtoul(p, &p, 10); 92 - if (!p || (*p && (*p != '\n'))) 93 return -EINVAL; 94 95 if (tmp > INT_MAX)
··· 89 char *p = (char *) page; 90 91 tmp = simple_strtoul(p, &p, 10); 92 + if ((*p != '\0') && (*p != '\n')) 93 return -EINVAL; 94 95 if (tmp > INT_MAX)