]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 25 May 2020 08:42:04 +0000 (10:42 +0200)
commit6c1b3c03e0b3ca80a4b522b0e7bcd53a6db1560e
tree31fbb782169ae4173ad177646318e952e1f30c44
parent36db45d72f75dd6bbc4f5390b7011ffcdebf08e6
net/cxgb4: Check the return from t4_query_params properly

BugLink: https://bugs.launchpad.net/bugs/1876765
commit c799fca8baf18d1bbbbad6c3b736eefbde8bdb90 upstream.

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: 01b6961410b7 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c