netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] fix drivers/net/irda/ali-ircc.c:ali_ircc_init()
Date: Sat, 8 Jul 2006 03:28:05 +0200	[thread overview]
Message-ID: <20060708012800.GH26941@stusta.de> (raw)

The Coverity checker spotted, that from the changes from commit 
898b1d16f8230fb912a0c2248df685735c6ceda3 the
       if (ret)
               platform_driver_unregister(&ali_ircc_driver);
was dead code.

This patch changes this function to what seems to have been the 
intention.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/net/irda/ali-ircc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.17-mm6-full/drivers/net/irda/ali-ircc.c.old	2006-07-08 01:44:53.000000000 +0200
+++ linux-2.6.17-mm6-full/drivers/net/irda/ali-ircc.c	2006-07-08 01:46:46.000000000 +0200
@@ -142,28 +142,29 @@
  *    Initialize chip. Find out whay kinds of chips we are dealing with
  *    and their configuation registers address
  */
 static int __init ali_ircc_init(void)
 {
 	ali_chip_t *chip;
 	chipio_t info;
-	int ret = -ENODEV;
+	int ret;
 	int cfg, cfg_base;
 	int reg, revision;
 	int i = 0;
 	
 	IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
 
 	ret = platform_driver_register(&ali_ircc_driver);
         if (ret) {
                 IRDA_ERROR("%s, Can't register driver!\n",
 			   ALI_IRCC_DRIVER_NAME);
                 return ret;
         }
 
+	ret = -ENODEV;
 	
 	/* Probe for all the ALi chipsets we know about */
 	for (chip= chips; chip->name; chip++, i++) 
 	{
 		IRDA_DEBUG(2, "%s(), Probing for %s ...\n", __FUNCTION__, chip->name);
 				
 		/* Try all config registers for this chip */


             reply	other threads:[~2006-07-08  1:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08  1:28 Adrian Bunk [this message]
2006-07-08 20:32 ` [2.6 patch] fix drivers/net/irda/ali-ircc.c:ali_ircc_init() David Miller

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=20060708012800.GH26941@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=samuel@sortiz.org \
    /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;
as well as URLs for NNTP newsgroup(s).