[PATCH] kernel/module.c: removed dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux