mlx5ib: Fix null pointer dereference in mlx5_ib_create_srq

Although "create_srq_user" does overwrite "in.pas" on some paths, it
also contains at least one feasible path which does not overwrite it.

Approved by:    hselasky (mentor)
MFC after:      1 week
Sponsored by:   Mellanox Technologies
This commit is contained in:
slavash 2018-12-05 13:48:10 +00:00
parent 863b4e521d
commit 00d1aa75c0

View File

@ -287,7 +287,7 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd,
else
err = create_srq_kernel(dev, srq, &in, buf_size);
if (err) {
if (err || !in.pas) {
mlx5_ib_warn(dev, "create srq %s failed, err %d\n",
pd->uobject ? "user" : "kernel", err);
goto err_srq;