diff options
author | Andrew Lunn <[email protected]> | 2018-09-25 01:50:00 +0200 |
---|---|---|
committer | David S. Miller <[email protected]> | 2018-09-26 20:23:31 -0700 |
commit | 3e322474485931e7ea6e4c5560089991a7f03cbc (patch) | |
tree | 6b1bf48c256946ca775c9ab0e7f6d0c77da5401d /lib/test_overflow.c | |
parent | 77f2d753819b7d50c16abfb778caf1fe075faed0 (diff) |
net: phy: sfp: Fix unregistering of HWMON SFP device
A HWMON device is only registered is the SFP module supports the
diagnostic page and is complient to SFF8472. Don't unconditionally
unregister the hwmon device when the SFP module is remove, otherwise
we access data structures which don't exist.
Reported-by: Florian Fainelli <[email protected]>
Fixes: 1323061a018a ("net: phy: sfp: Add HWMON support for module sensors")
Signed-off-by: Andrew Lunn <[email protected]>
Tested-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions