[dpc] Check for nullptr after thread_create

If thread_create fails to allocate memory for the thread_t or its
stack, it'll return nullptr. If this happens we're hosed, but it's
better to fail an assert than dereference a nullptr.

Test: booted on x64 qemu
Change-Id: I45c806fd47af78cae14aac01406daa03e03fa04b
diff --git a/kernel/kernel/dpc.cpp b/kernel/kernel/dpc.cpp
index 8047821..47bd571 100644
--- a/kernel/kernel/dpc.cpp
+++ b/kernel/kernel/dpc.cpp
@@ -183,6 +183,7 @@
     char name[10];
     snprintf(name, sizeof(name), "dpc-%u", cpu_num);
     cpu->dpc_thread = thread_create(name, &dpc_thread, NULL, DPC_THREAD_PRIORITY);
+    DEBUG_ASSERT(cpu->dpc_thread != nullptr);
     thread_set_cpu_affinity(cpu->dpc_thread, cpu_num_to_mask(cpu_num));
     thread_resume(cpu->dpc_thread);
 }