]> git.itanic.dy.fi Git - linux-stable/commit
net: cxgb4: fix return error value in t4_prep_fw
authorLi Heng <liheng40@huawei.com>
Mon, 29 Jun 2020 10:49:51 +0000 (18:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:10:45 +0000 (09:10 +0200)
commit0740535e79672695297b11625fb520afe5820304
treef6b1a9c054ec856278ae0c7f96510afcf3c02fe0
parentc94e289e6ca84b46537d9812b43a3214630af0ef
net: cxgb4: fix return error value in t4_prep_fw

[ Upstream commit 8a259e6b73ad8181b0b2ef338b35043433db1075 ]

t4_prep_fw goto bye tag with positive return value when something
bad happened and which can not free resource in adap_init0.
so fix it to return negative value.

Fixes: 16e47624e76b ("cxgb4: Add new scheme to update T4/T5 firmware")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Li Heng <liheng40@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c