From: Adrian Bunk Date: Sat, 8 Jul 2006 20:33:28 +0000 (-0700) Subject: [IRDA]: fix drivers/net/irda/ali-ircc.c:ali_ircc_init() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9c6c6795eda34e4dc38ecac912a16b6314082beb;p=openwrt%2Fstaging%2Fblogic.git [IRDA]: 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. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller --- diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index bf1fca5a3fa0..e3c8cd5eca67 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c @@ -146,7 +146,7 @@ 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; @@ -160,6 +160,7 @@ static int __init ali_ircc_init(void) return ret; } + ret = -ENODEV; /* Probe for all the ALi chipsets we know about */ for (chip= chips; chip->name; chip++, i++)