[PATCH 5.9 409/757] RDMA/hns: Add a check for current state before modifying QP