* [PATCH] kernel/module.c: removed dead code
@ 2005-10-19 0:47 Jayachandran C.
0 siblings, 0 replies; only message in thread
From: Jayachandran C. @ 2005-10-19 0:47 UTC (permalink / raw)
To: rusty; +Cc: Andrew Morton, linux-kernel
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 at gmail.com>
---
module.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)
--- linux-2.6.13-rc4-git2.clean/kernel/module.c 2005-10-13 11:42:59.000000000 -0700
+++ linux-2.6.13-rc4-git2.jc/kernel/module.c 2005-10-14 16:17:54.212548129 -0700
@@ -1853,8 +1853,7 @@
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-19 0:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-19 0:47 [PATCH] kernel/module.c: removed dead code Jayachandran C.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome