diff options
Diffstat (limited to 'Documentation/filesystems/configfs/configfs_example_explicit.c')
-rw-r--r-- | Documentation/filesystems/configfs/configfs_example_explicit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Documentation/filesystems/configfs/configfs_example_explicit.c b/Documentation/filesystems/configfs/configfs_example_explicit.c index d428cc9f07f3..1420233dfa55 100644 --- a/Documentation/filesystems/configfs/configfs_example_explicit.c +++ b/Documentation/filesystems/configfs/configfs_example_explicit.c | |||
@@ -89,7 +89,7 @@ static ssize_t childless_storeme_write(struct childless *childless, | |||
89 | char *p = (char *) page; | 89 | char *p = (char *) page; |
90 | 90 | ||
91 | tmp = simple_strtoul(p, &p, 10); | 91 | tmp = simple_strtoul(p, &p, 10); |
92 | if (!p || (*p && (*p != '\n'))) | 92 | if ((*p != '\0') && (*p != '\n')) |
93 | return -EINVAL; | 93 | return -EINVAL; |
94 | 94 | ||
95 | if (tmp > INT_MAX) | 95 | if (tmp > INT_MAX) |
@@ -464,9 +464,8 @@ static int __init configfs_example_init(void) | |||
464 | return 0; | 464 | return 0; |
465 | 465 | ||
466 | out_unregister: | 466 | out_unregister: |
467 | for (; i >= 0; i--) { | 467 | for (i--; i >= 0; i--) |
468 | configfs_unregister_subsystem(example_subsys[i]); | 468 | configfs_unregister_subsystem(example_subsys[i]); |
469 | } | ||
470 | 469 | ||
471 | return ret; | 470 | return ret; |
472 | } | 471 | } |
@@ -475,9 +474,8 @@ static void __exit configfs_example_exit(void) | |||
475 | { | 474 | { |
476 | int i; | 475 | int i; |
477 | 476 | ||
478 | for (i = 0; example_subsys[i]; i++) { | 477 | for (i = 0; example_subsys[i]; i++) |
479 | configfs_unregister_subsystem(example_subsys[i]); | 478 | configfs_unregister_subsystem(example_subsys[i]); |
480 | } | ||
481 | } | 479 | } |
482 | 480 | ||
483 | module_init(configfs_example_init); | 481 | module_init(configfs_example_init); |