Skip to contentSkip to conversation

char_dev: Remove pointless assignment from __register_chrdev_region()

PATCH New Jan Kara 1 participant 1 message Oct 22, 2014 VFS

lore
Share & tools
lore

Jan Kara

author reviewer
#0 lore raw

PATCH 1/1 char_dev: Remove pointless assignment from __register_chrdev_region()

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

---
 fs/char_dev.c | 1 -
 1 file changed, 1 deletion(-)
fs/char_dev.c +0 -1
index f77f7702fabe..67b2007f10fe 100644
@@ -117,7 +117,6 @@ __register_chrdev_region(unsigned int major, unsigned int baseminor,
 			goto out;
 		}
 		major = i;
-		ret = major;
 	}
 
 	cd->major = major;
Signature · 1 line
1.8.1.4