]> git.baikalelectronics.ru Git - kernel.git/commit
e1000e: fix a missing check for return value
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 4 Jan 2019 01:17:03 +0000 (17:17 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 6 Feb 2019 00:08:55 +0000 (16:08 -0800)
commitd8febe1e9b2f36d66f4eb10a482210b25538cf20
tree12b1f7a27c36672633d442895a6570d976e04b03
parent1f4af14aa2ab263206446beeb103c5dce8c35d59
e1000e: fix a missing check for return value

The change is based on the issue found by Kangjie Lu <kjlu@umn.edu> where
we not checking the return value of a register read/write which could result
in a NULL pointer dereference if the read/write fails.

Since we are only trying to disable the far-end loopback, if the read
and write of register fails, we do not want to bail out of the function.
We just want to log that it failed to disable and continue on.

CC: Sasha Neftin <sasha.neftin@intel.com>
CC: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/80003es2lan.c