Skip to content

Commit

Permalink
igb: Fix for improper exit in igb_get_i2c_client
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Carolyn Wyborny authored and Jeff Kirsher committed Feb 15, 2013
1 parent 74e238e commit d3f8ef1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/net/ethernet/intel/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d3f8ef1

Please sign in to comment.