mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-06 22:55:11 +00:00
[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>
This commit is contained in:
parent
066bb8d03b
commit
6fe2e70bbe
1 changed files with 1 additions and 2 deletions
|
@ -1854,8 +1854,7 @@ static struct module *load_module(void __user *umod,
|
||||||
kfree(args);
|
kfree(args);
|
||||||
free_hdr:
|
free_hdr:
|
||||||
vfree(hdr);
|
vfree(hdr);
|
||||||
if (err < 0) return ERR_PTR(err);
|
return ERR_PTR(err);
|
||||||
else return ptr;
|
|
||||||
|
|
||||||
truncated:
|
truncated:
|
||||||
printk(KERN_ERR "Module len %lu truncated\n", len);
|
printk(KERN_ERR "Module len %lu truncated\n", len);
|
||||||
|
|
Loading…
Add table
Reference in a new issue