linux/drivers/infiniband/hw
Leon Romanovsky b9a85e5eec RDMA/usnic: Silence uninitialized symbol smatch warnings
The patch 1da177e4c3: "Linux-2.6.12-rc2" from Apr 16, 2005
(linux-next), leads to the following Smatch static checker warning:

        drivers/infiniband/hw/mthca/mthca_cmd.c:644 mthca_SYS_EN()
        error: uninitialized symbol 'out'.

drivers/infiniband/hw/mthca/mthca_cmd.c
    636 int mthca_SYS_EN(struct mthca_dev *dev)
    637 {
    638         u64 out;
    639         int ret;
    640
    641         ret = mthca_cmd_imm(dev, 0, &out, 0, 0, CMD_SYS_EN, CMD_TIME_CLASS_D);

We pass out here and it gets used without being initialized.

        err = mthca_cmd_post(dev, in_param,
                             out_param ? *out_param : 0,
                                         ^^^^^^^^^^
                             in_modifier, op_modifier,
                             op, context->token, 1);

It's the same in mthca_cmd_wait() and mthca_cmd_poll().

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/533bc3df-8078-4397-b93d-d1f6cec9b636@moroto.mountain
Link: https://lore.kernel.org/r/c559cb7113158c02d75401ac162652072ef1b5f0.1699867650.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2023-11-15 15:57:39 +02:00
..
bnxt_re RDMA/bnxt_re: Remove roundup_pow_of_two depth for all hardware queue resources 2023-11-13 10:27:14 +02:00
cxgb4 RDMA/cxgb4: Check skb value for failure to allocate 2023-09-11 14:55:53 +03:00
efa RDMA/efa: Fix wrong resources deallocation order 2023-08-22 17:21:53 +03:00
erdma RDMA/erdma: Fix NULL pointer access in regmr_cmd 2023-09-18 10:42:19 +03:00
hfi1 RDMA/hfi1: Copy userspace arrays safely 2023-11-13 10:21:33 +02:00
hns RDMA/hns: Fix init failure of RoCE VF and HIP08 2023-10-19 09:49:40 +03:00
irdma RDMA/irdma: Use crypto_shash_digest() in irdma_ieq_check_mpacrc() 2023-11-13 10:46:04 +02:00
mana RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to enable RX coalescing 2023-06-01 12:52:01 -03:00
mlx4 IB/mlx4: Fix the size of a buffer in add_port_entries() 2023-09-23 21:53:24 +03:00
mlx5 IB/mlx5: Fix init stage error handling to avoid double free of same QP and UAF 2023-10-31 11:16:05 -03:00
mthca RDMA/usnic: Silence uninitialized symbol smatch warnings 2023-11-15 15:57:39 +02:00
ocrdma RDMA: Remove unnecessary ternary operators 2023-07-31 15:16:12 +03:00
qedr RDMA: Remove unnecessary ternary operators 2023-07-31 15:16:12 +03:00
qib RDMA for v6.7 2023-11-02 15:20:30 -10:00
usnic RDMA/usnic: Annotate struct usnic_uiom_chunk with __counted_by 2023-10-02 14:44:54 +03:00
vmw_pvrdma RDMA/core: Remove NULL check before dev_{put, hold} 2023-10-24 18:16:04 +03:00
Makefile RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter 2022-11-11 11:40:09 +02:00