Commit a0ba9ce2 authored by Liang Yan's avatar Liang Yan Committed by Daniel Verkamp
Browse files

nvme/reset: don't crash if no namespaces are usable



Change-Id: I79b03c97f09125070dbdb1abe49db4a338f6a27f
Signed-off-by: default avatarLiang Yan <liangx.yan@intel.com>
parent cb18017c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -579,6 +579,9 @@ associate_workers_with_ns(void)
	count = g_num_namespaces;

	for (i = 0; i < count; i++) {
		if (entry == NULL) {
			break;
		}
		ns_ctx = malloc(sizeof(struct ns_worker_ctx));
		if (!ns_ctx) {
			return -1;