scst_dlm: Refuse to proceed if parsing the DLM node IDs failed

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7869 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-01-12 05:01:03 +00:00
parent 7cfd592f54
commit cc9872d553

View File

@@ -640,7 +640,10 @@ static int scst_dlm_update_nodeids(struct scst_pr_dlm_data *pr_dlm)
pr_dlm->local_nodeid = nodeid;
pr_dlm->nodeid[i] = nodeid;
}
ret = 0;
if (WARN_ON_ONCE(pr_dlm->local_nodeid == 0))
ret = -EINVAL;
else
ret = 0;
out:
kfree(entries);