]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix return of random stack value
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 10 Feb 2021 19:28:41 +0000 (13:28 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2021 22:22:13 +0000 (14:22 -0800)
commit35ae56659a9e4aa03fdebe34eaa527b9f11d13d3
tree836b4b192ed5b65365b239c74739dc2f38418c0b
parent2f242475f59582edd9eea84be4b2c9719913039f
net: hns3: fix return of random stack value

Currently, a random stack value is being returned because variable
_ret_ is not properly initialized. This variable is actually not
used anymore and it should be removed.

Fix this by removing all instances of variable ret and return 0.

Fixes: 2bfe70dd4804 ("net: hns3: remove redundant return value of hns3_uninit_all_ring()")
Addresses-Coverity-ID: 1501700 ("Uninitialized scalar variable")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c