diff options
author | Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> | 2013-07-19 22:56:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-20 02:08:16 +0200 |
commit | e9a355a9b407da41b7cb22767f3898d4628411b2 (patch) | |
tree | 588a3554475da0ebc1b1c477d71cfb6de1b65bce /drivers/net | |
parent | qlcnic: Set __QLCNIC_DEV_UP in adapter state before enabling interrupts (diff) | |
download | linux-e9a355a9b407da41b7cb22767f3898d4628411b2.tar.xz linux-e9a355a9b407da41b7cb22767f3898d4628411b2.zip |
qlcnic: Fix NULL pointer dereference in VF probe path.
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h index b00cf5665eab..f4bb8f5d7453 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h @@ -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, |