Patchwork [net-next,02/10] igb: Fix for improper exit in igb_get_i2c_client

login
register
mail settings
Submitter Jeff Kirsher
Date Feb. 15, 2013, 10:04 a.m.
Message ID <1360922649-3388-3-git-send-email-jeffrey.t.kirsher@intel.com>
Download mbox | patch
Permalink /patch/220695/
State Accepted
Delegated to: David Miller
Headers show

Comments

Jeff Kirsher - Feb. 15, 2013, 10:04 a.m.
From: Carolyn Wyborny <carolyn.wyborny@intel.com>

This patch fixes an issue where we check for irq's disabled then exit after
explicitly disabling them with spin_lock_irqsave.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <arron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Patch

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index b070a97..d84f28c 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -7750,12 +7750,7 @@  igb_get_i2c_client(struct igb_adapter *adapter, u8 dev_addr)
 		}
 	}
 
-	/* no client_list found, create a new one as long as
-	 * irqs are not disabled
-	 */
-	if (unlikely(irqs_disabled()))
-		goto exit;
-
+	/* no client_list found, create a new one */
 	client_list = kzalloc(sizeof(*client_list), GFP_KERNEL);
 	if (client_list == NULL)
 		goto exit;