From: Greg Kroah-Hartman Date: Thu, 30 Apr 2020 14:45:32 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v5.4.37~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56e66218d27716a595d8f02473b0cecbc1a719bf;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: net-cxgb4-check-the-return-from-t4_query_params-properly.patch --- diff --git a/queue-4.9/net-cxgb4-check-the-return-from-t4_query_params-properly.patch b/queue-4.9/net-cxgb4-check-the-return-from-t4_query_params-properly.patch new file mode 100644 index 00000000000..1ca42569d3b --- /dev/null +++ b/queue-4.9/net-cxgb4-check-the-return-from-t4_query_params-properly.patch @@ -0,0 +1,39 @@ +From c799fca8baf18d1bbbbad6c3b736eefbde8bdb90 Mon Sep 17 00:00:00 2001 +From: Jason Gunthorpe +Date: Tue, 14 Apr 2020 12:27:08 -0300 +Subject: net/cxgb4: Check the return from t4_query_params properly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Jason Gunthorpe + +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 +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c ++++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +@@ -3400,7 +3400,7 @@ int t4_phy_fw_ver(struct adapter *adap, + FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_VERSION)); + ret = t4_query_params(adap, adap->mbox, adap->pf, 0, 1, + ¶m, &val); +- if (ret < 0) ++ if (ret) + return ret; + *phy_fw_ver = val; + return 0; diff --git a/queue-4.9/series b/queue-4.9/series index cf40f61c462..02fae14370b 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -61,3 +61,4 @@ fuse-fix-possibly-missed-wake-up-after-abort.patch mtd-cfi-fix-deadloop-in-cfi_cmdset_0002.c-do_write_buffer.patch usb-gadget-udc-bdc-remove-unnecessary-null-checks-in-bdc_req_complete.patch nfsd-memory-corruption-in-nfsd4_lock.patch +net-cxgb4-check-the-return-from-t4_query_params-properly.patch