diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-12-13 15:28:11 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-12-17 03:26:17 +0100 |
commit | 7203d10e93b6e6e1d19481ef7907de6a9133a467 (patch) | |
tree | 723ae8cb4d62cf758654fcf3b3ea52f3dba2b065 /rust | |
parent | team: Fix feature exposure when no ports are present (diff) | |
download | linux-7203d10e93b6e6e1d19481ef7907de6a9133a467.tar.xz linux-7203d10e93b6e6e1d19481ef7907de6a9133a467.zip |
net: hinic: Fix cleanup in create_rxqs/txqs()
There is a check for NULL at the start of create_txqs() and
create_rxqs() which tess if "nic_dev->txqs" is non-NULL. The
intention is that if the device is already open and the queues
are already created then we don't create them a second time.
However, the bug is that if we have an error in the create_txqs()
then the pointer doesn't get set back to NULL. The NULL check
at the start of the function will say that it's already open when
it's not and the device can't be used.
Set ->txqs back to NULL on cleanup on error.
Fixes: c3e79baf1b03 ("net-next/hinic: Add logical Txq and Rxq")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/0cc98faf-a0ed-4565-a55b-0fa2734bc205@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions