linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] char_dev: Remove pointless assignment from __register_chrdev_region()
@ 2014-10-22  7:40 Jan Kara
  0 siblings, 0 replies; only message in thread
From: Jan Kara @ 2014-10-22  7:40 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, Jan Kara

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>
---
 fs/char_dev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/char_dev.c b/fs/char_dev.c
index f77f7702fabe..67b2007f10fe 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -117,7 +117,6 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor,
 			goto out;
 		}
 		major = i;
-		ret = major;
 	}
 
 	cd->major = major;
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-22  7:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-22  7:40 [PATCH] char_dev: Remove pointless assignment from __register_chrdev_region() Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).