From: Jayachandran C Date: Fri, 6 Jan 2006 08:19:54 +0000 (-0800) Subject: [PATCH] kernel/module.c: removed dead code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6fe2e70bbed3995d930f39452fb6ce3be7dc47dc;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/module.c b/kernel/module.c index 2ea929d51ad..4b06bbad49c 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1854,8 +1854,7 @@ static struct module *load_module(void __user *umod, kfree(args); free_hdr: vfree(hdr); - if (err < 0) return ERR_PTR(err); - else return ptr; + return ERR_PTR(err); truncated: printk(KERN_ERR "Module len %lu truncated\n", len);