Skip to contentSkip to conversation

fix drivers/net/irda/ali-ircc.c:ali_ircc_init()

PATCH Applied Adrian Bunk 2 participants 2 messages Jul 8, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix drivers/net/irda/ali-ircc.c:ali_ircc_init()

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.

---

 drivers/net/irda/ali-ircc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/irda/ali-ircc.c renamed from drivers/net/irda/ali-ircc.c.old +2 -1
@@ -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 */
maintainer Applied
#1 lore raw

From: Adrian Bunk <[email protected]>
Date: Sat, 8 Jul 2006 03:28:05 +0200

Quoted 10 lines

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.

Applied, thanks Adrian.