There is a copy and paste bug so this code checks "sq->dep_wqe" where
"sq->wr_priv" was intended. It could result in a NULL pointer
dereference.
Fixes: 2ca62599aa0b ("net/mlx5: HWS, added send engine and context handling")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/da822315-02b7-4f5b-9c86-0d5176c5069d@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
}
sq->wr_priv = kzalloc(sizeof(*sq->wr_priv) * buf_sz, GFP_KERNEL);
- if (!sq->dep_wqe) {
+ if (!sq->wr_priv) {
err = -ENOMEM;
goto free_dep_wqe;
}