qlcnic: Fix function return error check
authorShahed Shaikh <shahed.shaikh@qlogic.com>
Mon, 24 Feb 2014 13:54:46 +0000 (08:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Feb 2014 23:32:39 +0000 (18:32 -0500)
Driver was treating -ve return value as success in case of
qlcnic_enable_msi_legacy() failure

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c

index ba78c7481fa3432f32fd7d5a5e7c56b66423b801..149c4b6d340bea269bfceee46b98c5b69fd8e8ba 100644 (file)
@@ -818,7 +818,7 @@ static int qlcnic_82xx_setup_intr(struct qlcnic_adapter *adapter)
                        qlcnic_disable_multi_tx(adapter);
 
                        err = qlcnic_enable_msi_legacy(adapter);
-                       if (!err)
+                       if (err)
                                return err;
                }
        }