Skip to content

Commit

Permalink
qlcnic: Fix NULL pointer dereference in VF probe path.
Browse files Browse the repository at this point in the history
o Check for non-NULL set_mac_filter_count function pointer
  before calling it fixes the panic.

This patch fixes regression introduced by patch
"qlcnic: Secondary unicast MAC address support." with
commit id 168e4fb54c11865668ad50eff81b5f2729e0e0f4.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sucheta Chakraborty authored and David S. Miller committed Jul 20, 2013
1 parent cfacb17 commit e9a355a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1869,7 +1869,8 @@ static inline void qlcnic_free_mac_list(struct qlcnic_adapter *adapter)

static inline void qlcnic_set_mac_filter_count(struct qlcnic_adapter *adapter)
{
adapter->ahw->hw_ops->set_mac_filter_count(adapter);
if (adapter->ahw->hw_ops->set_mac_filter_count)
adapter->ahw->hw_ops->set_mac_filter_count(adapter);
}

static inline void qlcnic_dev_request_reset(struct qlcnic_adapter *adapter,
Expand Down

0 comments on commit e9a355a

Please sign in to comment.