]> git.baikalelectronics.ru Git - kernel.git/commitdiff
fs/char_dev.c: remove pointless assignment from __register_chrdev_region()
authorJan Kara <jack@suse.cz>
Wed, 10 Dec 2014 23:42:10 +0000 (15:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:04 +0000 (17:41 -0800)
At one place we assign major number we found to ret.  That assignment is
then never used and actually doesn't make any sense given how the code is
currently structured (the assignment comes from pre-git times).  Just
remove it.

Coverity id: 1226852.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/char_dev.c

index f77f7702fabe1e2ab0a21f6ef0b9dd36247a9f50..67b2007f10fe65986a05d3af07e3b2b99ded7c61 100644 (file)
@@ -117,7 +117,6 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor,
                        goto out;
                }
                major = i;
-               ret = major;
        }
 
        cd->major = major;