diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-12-18 18:19:47 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-02-11 20:54:30 +0300 |
commit | 88d736da9d048419370acff19eef9db2ba1d4c87 (patch) | |
tree | 5f1c6a62b6eb8dd356a6d2a576d2b81c7ecffa56 | |
parent | e93901426b7cb921b9e8722b19f9e27c643b3375 (diff) | |
download | linux-88d736da9d048419370acff19eef9db2ba1d4c87.tar.xz |
vxge: ensure data0 is initialized in when fetching firmware version information
commit f7db2beb4c2c6cc8111f5ab90fc7363ca91107b6 upstream.
Currently variable data0 is not being initialized so a garbage value is
being passed to vxge_hw_vpath_fw_api and this value is being written to
the rts_access_steer_data0 register. There are other occurrances where
data0 is being initialized to zero (e.g. in function
vxge_hw_upgrade_read_version) so I think it makes sense to ensure data0
is initialized likewise to 0.
Detected by CoverityScan, CID#140696 ("Uninitialized scalar variable")
Fixes: 8424e00dfd52 ("vxge: serialize access to steering control register")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c index 2bbd01fcb9b0..4332ebbd7162 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-config.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c @@ -808,7 +808,7 @@ __vxge_hw_vpath_fw_ver_get(struct __vxge_hw_virtualpath *vpath, struct vxge_hw_device_date *fw_date = &hw_info->fw_date; struct vxge_hw_device_version *flash_version = &hw_info->flash_version; struct vxge_hw_device_date *flash_date = &hw_info->flash_date; - u64 data0, data1 = 0, steer_ctrl = 0; + u64 data0 = 0, data1 = 0, steer_ctrl = 0; enum vxge_hw_status status; status = vxge_hw_vpath_fw_api(vpath, |