<--snip--> > A space between 'if' and '(', please. scripts/checkpatch.pl can warn > you about this kind of thing. <--snip--> Resending with corrections Signed-off-by: Anubhav Rakshit <anubhavrocks@xxxxxxxxx> --- fs/char_dev.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/char_dev.c b/fs/char_dev.c index 038674a..e042aa7 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c @@ -200,6 +200,9 @@ int register_chrdev_region(dev_t from, unsigned count, const char *name) dev_t to = from + count; dev_t n, next; + if (unlikely(count == 0)) + return -EINVAL; + for (n = from; n < to; n = next) { next = MKDEV(MAJOR(n)+1, 0); if (next > to) -- -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html