aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorJayachandran C <c.jayachandran@gmail.com>2006-01-06 03:19:54 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:59 -0500
commit6fe2e70bbed3995d930f39452fb6ce3be7dc47dc (patch)
treeb196b26fa0046c39bf072238463329dc66ccca82 /kernel/module.c
parent066bb8d03b6e52e4844d37145573d6a2bedaa339 (diff)
[PATCH] kernel/module.c: removed dead code
This patch fixes an issue reported by Coverity in kernel/module.c Error reported: Cannot reach this line of code "else return ptr;" Patch description: This is the error path, so 'err' will be negative, the else case is not required, this patch removes it. Signed-off-by: Jayachandran C. <c.jayachandran@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 2ea929d51ad0..4b06bbad49c2 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1854,8 +1854,7 @@ static struct module *load_module(void __user *umod,
1854 kfree(args); 1854 kfree(args);
1855 free_hdr: 1855 free_hdr:
1856 vfree(hdr); 1856 vfree(hdr);
1857 if (err < 0) return ERR_PTR(err); 1857 return ERR_PTR(err);
1858 else return ptr;
1859 1858
1860 truncated: 1859 truncated:
1861 printk(KERN_ERR "Module len %lu truncated\n", len); 1860 printk(KERN_ERR "Module len %lu truncated\n", len);