Commit 9c6c6795 authored by Adrian Bunk's avatar Adrian Bunk Committed by David S. Miller

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

The Coverity checker spotted, that from the changes from commit 
898b1d16 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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1252ecf6
...@@ -146,7 +146,7 @@ static int __init ali_ircc_init(void) ...@@ -146,7 +146,7 @@ static int __init ali_ircc_init(void)
{ {
ali_chip_t *chip; ali_chip_t *chip;
chipio_t info; chipio_t info;
int ret = -ENODEV; int ret;
int cfg, cfg_base; int cfg, cfg_base;
int reg, revision; int reg, revision;
int i = 0; int i = 0;
...@@ -160,6 +160,7 @@ static int __init ali_ircc_init(void) ...@@ -160,6 +160,7 @@ static int __init ali_ircc_init(void)
return ret; return ret;
} }
ret = -ENODEV;
/* Probe for all the ALi chipsets we know about */ /* Probe for all the ALi chipsets we know about */
for (chip= chips; chip->name; chip++, i++) for (chip= chips; chip->name; chip++, i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment