From d3f8ef1169afb08976b4b1dafe7bc740f655d886 Mon Sep 17 00:00:00 2001 From: Carolyn Wyborny Date: Wed, 23 Jan 2013 03:37:58 +0000 Subject: [PATCH] igb: Fix for improper exit in igb_get_i2c_client 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 Signed-off-by: Carolyn Wyborny Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igb/igb_main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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; -- 2.7.4