]> git.baikalelectronics.ru Git - kernel.git/commit
net/cxgb4: Check the return from t4_query_params properly
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 14 Apr 2020 15:27:08 +0000 (12:27 -0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Apr 2020 23:44:54 +0000 (16:44 -0700)
commitb588daa3c6832c0fd7dae88d7621d52a13f49bd0
tree74ece70e1be1be042bb1c82c0f3b25bd7fbf17d8
parent9d92d0853a0ea81a71672d606b32ac676bda796f
net/cxgb4: Check the return from t4_query_params properly

Positive return values are also failures that don't set val,
although this probably can't happen. Fixes gcc 10 warning:

drivers/net/ethernet/chelsio/cxgb4/t4_hw.c: In function ‘t4_phy_fw_ver’:
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:3747:14: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 3747 |  *phy_fw_ver = val;

Fixes: 63431aa748e8 ("cxgb4: Add PHY firmware support for T420-BT cards")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c