iavf: fix error return code in iavf_init_get_resources()
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 18 Jun 2020 14:19:53 +0000 (14:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:50 +0000 (08:23 +0200)
commit5a38679d2020090973bef30243266a2e17b18b59
tree3953a204f6621ab71a52150173564ac03928ece7
parenteaef1fec3fc9f8304d7b66a74ae2c34b89e7eded
iavf: fix error return code in iavf_init_get_resources()

[ Upstream commit 753f3884f253de6b6d3a516e6651bda0baf4aede ]

Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/iavf/iavf_main.c