mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
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: b66c7bc1cd ("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>
This commit is contained in:
parent
f27a965b04
commit
8d5ce7e06f
1 changed files with 3 additions and 1 deletions
|
|
@ -1863,8 +1863,10 @@ static int iavf_init_get_resources(struct iavf_adapter *adapter)
|
|||
|
||||
adapter->rss_key = kzalloc(adapter->rss_key_size, GFP_KERNEL);
|
||||
adapter->rss_lut = kzalloc(adapter->rss_lut_size, GFP_KERNEL);
|
||||
if (!adapter->rss_key || !adapter->rss_lut)
|
||||
if (!adapter->rss_key || !adapter->rss_lut) {
|
||||
err = -ENOMEM;
|
||||
goto err_mem;
|
||||
}
|
||||
if (RSS_AQ(adapter))
|
||||
adapter->aq_required |= IAVF_FLAG_AQ_CONFIGURE_RSS;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue