aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2012-10-13 01:00:06 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-11-01 04:41:54 -0400
commit3645adbbab4329dd83a41674a56bf4afcdcc5914 (patch)
tree0c60ec642ce7440b2e05d60dfcc66c7e2362dc7a /drivers
parent810b6d7638a288216f99bd190470d67061c8bd88 (diff)
ixgbe: fix uninitialized event.type in ixgbe_ptp_check_pps_event
This patch fixes a bug in ixgbe_ptp_check_pps_event where the type was uninitialized and could cause unknown event outcomes. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 842ba15550a5..01d99af0b9ba 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -387,6 +387,15 @@ void ixgbe_ptp_check_pps_event(struct ixgbe_adapter *adapter, u32 eicr)
387 struct ixgbe_hw *hw = &adapter->hw; 387 struct ixgbe_hw *hw = &adapter->hw;
388 struct ptp_clock_event event; 388 struct ptp_clock_event event;
389 389
390 event.type = PTP_CLOCK_PPS;
391
392 /* this check is necessary in case the interrupt was enabled via some
393 * alternative means (ex. debug_fs). Better to check here than
394 * everywhere that calls this function.
395 */
396 if (!adapter->ptp_clock)
397 return;
398
390 switch (hw->mac.type) { 399 switch (hw->mac.type) {
391 case ixgbe_mac_X540: 400 case ixgbe_mac_X540:
392 ptp_clock_event(adapter->ptp_clock, &event); 401 ptp_clock_event(adapter->ptp_clock, &event);