mlx5 Coverity reported issues
Subsystems (2)
** CID 1056375: Error handling issues (CHECKED_RETURN) /drivers/net/ethernet/mellanox/mlx5/core/cq.c: 133 in mlx5_core_create_cq()
________________________________________________________________________________________________________
*** CID 1056375: Error handling issues (CHECKED_RETURN) /drivers/net/ethernet/mellanox/mlx5/core/cq.c: 133 in mlx5_core_create_cq()
127 return 0;
128
129 err_cmd: 130 memset(&din, 0, sizeof(din)); 131 memset(&dout, 0, sizeof(dout)); 132 din.hdr.opcode = cpu_to_be16(MLX5_CMD_OP_DESTROY_CQ); >>> CID 1056375: Error handling issues (CHECKED_RETURN) >>> Calling "mlx5_cmd_exec" without checking return value (as is done elsewhere 44 out of 46 times). 133 mlx5_cmd_exec(dev, &din, sizeof(din), &dout, sizeof(dout)); 134 return err; 135 } 136 EXPORT_SYMBOL(mlx5_core_create_cq);
137
138 int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq)
** CID 1056376: Error handling issues (CHECKED_RETURN) /drivers/net/ethernet/mellanox/mlx5/core/qp.c: 242 in mlx5_core_create_qp()
________________________________________________________________________________________________________
*** CID 1056376: Error handling issues (CHECKED_RETURN) /drivers/net/ethernet/mellanox/mlx5/core/qp.c: 242 in mlx5_core_create_qp() 236
237 err_cmd: 238 memset(&din, 0, sizeof(din)); 239 memset(&dout, 0, sizeof(dout)); 240 din.hdr.opcode = cpu_to_be16(MLX5_CMD_OP_DESTROY_QP); 241 din.qpn = cpu_to_be32(qp->qpn); >>> CID 1056376: Error handling issues (CHECKED_RETURN) >>> Calling "mlx5_cmd_exec" without checking return value (as is done elsewhere 44 out of 46 times). 242 mlx5_cmd_exec(dev, &din, sizeof(din), &out, sizeof(dout)); 243 244 return err; 245 } 246 EXPORT_SYMBOL_GPL(mlx5_core_create_qp);
247