Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3f8ef11 authored by Carolyn Wyborny's avatar Carolyn Wyborny Committed by Jeff Kirsher
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: default avatarAaron Brown <arron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 74e238ea
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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;