diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-06-09 20:56:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-10 01:39:14 +0300 |
commit | f3b5a8907543e2c539d09d01a1732826e070d351 (patch) | |
tree | aa478dd9d5670b39b3b27b7d9b31485cd129c0e5 /net/unix/af_unix.c | |
parent | 8b8701d0b4925807a6d4dc4699cb80a1e16218ad (diff) | |
download | linux-f3b5a8907543e2c539d09d01a1732826e070d351.tar.xz |
mlxsw: thermal: Fix null dereference of NULL temperature parameter
The call to mlxsw_thermal_module_temp_and_thresholds_get passes a NULL
pointer for the temperature and this can be dereferenced in this function
if the mlxsw_reg_query call fails. The simplist fix is to pass the
address of dummy temperature variable instead of a NULL pointer.
Addresses-Coverity: ("Explicit null dereferenced")
Fixes: 72a64c2fe9d8 ("mlxsw: thermal: Read module temperature thresholds using MTMP register")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions