From: Carolyn Wyborny Date: Wed, 23 Jan 2013 03:43:01 +0000 (+0000) Subject: igb: Fix for improper allocation flag in igb_get_i2c_client X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=199f6ccac11e93761ee24e35c621992c078fe76f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git igb: Fix for improper allocation flag in igb_get_i2c_client This patch fixes the allocation function in igb_get_i2c_client to use GFP_ATOMIC instead of GFP_KERNEL because we have a spinlock. Reported-by: Dan Carpenter Signed-off-by: Carolyn Wyborny Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index d84f28c683c5..c19a35c556f9 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -7751,7 +7751,7 @@ igb_get_i2c_client(struct igb_adapter *adapter, u8 dev_addr) } /* no client_list found, create a new one */ - client_list = kzalloc(sizeof(*client_list), GFP_KERNEL); + client_list = kzalloc(sizeof(*client_list), GFP_ATOMIC); if (client_list == NULL) goto exit;