mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jayachandran C." <jchandra@digeo.com>
To: rusty@rustcorp.com.au
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] kernel/module.c: removed dead code
Date: Tue, 18 Oct 2005 17:47:59 -0700	[thread overview]
Message-ID: <20051019004759.GD5338@random.pao.digeo.com> (raw)

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);

                 reply	other threads:[~2005-10-19  0:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051019004759.GD5338@random.pao.digeo.com \
    --to=jchandra@digeo.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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