net/hns3: fix uninitialized value
Checks
Commit Message
This patch fixes uninitialized auto_state value when
querying FEC mode of device.
Bugzilla ID: 1498
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
Cc: stable@dpdk.org
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 7/23/2024 7:09 AM, Jie Hai wrote:
> This patch fixes uninitialized auto_state value when
> querying FEC mode of device.
>
> Bugzilla ID: 1498
> Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
> Cc: stable@dpdk.org
>
> Signed-off-by: Jie Hai <haijie1@huawei.com>
> Acked-by: Huisong Li <lihuisong@huawei.com>
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
>
Applied to dpdk-next-net/main, thanks.
@@ -6046,7 +6046,7 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
{
struct hns3_sfp_info_cmd *resp;
uint32_t tmp_fec_capa;
- uint8_t auto_state;
+ uint8_t auto_state = 0;
struct hns3_cmd_desc desc;
int ret;