summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorEdwin Peer <edwin.peer@broadcom.com>2020-09-20 21:08:55 -0400
committerDavid S. Miller <davem@davemloft.net>2020-09-20 19:04:44 -0700
commitd69753fa1ecb3218b56b022722f7a5822735b876 (patch)
treeb9fa53231b61722ad9f49515ddf6dfa689e5cfa1 /block
parent492adcf481292521ee8df1a482dc12acdb28aa15 (diff)
downloadlinux-d69753fa1ecb3218b56b022722f7a5822735b876.tar.bz2
bnxt_en: return proper error codes in bnxt_show_temp
Returning "unknown" as a temperature value violates the hwmon interface rules. Appropriate error codes should be returned via device_attribute show instead. These will ultimately be propagated to the user via the file system interface. In addition to the corrected error handling, it is an even better idea to not present the sensor in sysfs at all if it is known that the read will definitely fail. Given that temp1_input is currently the only sensor reported, ensure no hwmon registration if TEMP_MONITOR_QUERY is not supported or if it will fail due to access permissions. Something smarter may be needed if and when other sensors are added. Fixes: 12cce90b934b ("bnxt_en: fix HWRM error when querying VF temperature") Signed-off-by: Edwin Peer <edwin.peer@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions