Commit 6fe2e70bbed3995d930f39452fb6ce3be7dc47dc

Authored by Jayachandran C
Committed by Linus Torvalds
1 parent 066bb8d03b

[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>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

... ... @@ -1854,8 +1854,7 @@
1854 1854 kfree(args);
1855 1855 free_hdr:
1856 1856 vfree(hdr);
1857   - if (err < 0) return ERR_PTR(err);
1858   - else return ptr;
  1857 + return ERR_PTR(err);
1859 1858  
1860 1859 truncated:
1861 1860 printk(KERN_ERR "Module len %lu truncated\n", len);