qedr: return -EINVAL if pd is null and avoid null ptr dereference

Currently, if pd is null then we hit a null pointer derference
on accessing pd->pd_id.  Instead of just printing an error message
we should also return -EINVAL immediately.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Colin Ian King 2016-10-18 19:39:28 +01:00 • committed by Doug Ledford
commit ea7ef2accd