Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fe2e70b authored by Jayachandran C's avatar Jayachandran C Committed by Linus Torvalds
Browse files

[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: default avatarJayachandran C. <c.jayachandran@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 066bb8d0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);