]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/mlx4: Avoid false error about access to uninitialized gids array
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 3 Dec 2024 13:44:25 +0000 (15:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:03 +0000 (12:50 +0100)
commit160450e4908bc4ebe89e9f8d8452c766a2808093
tree0e82bddd97feb2078c6c877470fb7f1d4f0c7499
parentf92f10cdb7fafdbd42e464e2b04649d71905a11b
RDMA/mlx4: Avoid false error about access to uninitialized gids array

[ Upstream commit 1f53d88cbb0dcc7df235bf6611ae632b254fccd8 ]

Smatch generates the following false error report:
drivers/infiniband/hw/mlx4/main.c:393 mlx4_ib_del_gid() error: uninitialized symbol 'gids'.

Traditionally, we are not changing kernel code and asking people to fix
the tools. However in this case, the fix can be done by simply rearranging
the code to be more clear.

Fixes: e26be1bfef81 ("IB/mlx4: Implement ib_device callbacks")
Link: https://patch.msgid.link/6a3a1577463da16962463fcf62883a87506e9b62.1733233426.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mlx4/main.c