phb4: Handle allocation errors in phb4_eeh_dump_regs()
If the zalloc fails (and it can be a rather large allocation),
we will overwite memory at 0 instead of failing.
@@ -2072,6 +2072,10 @@ static void phb4_eeh_dump_regs(struct phb4 *p)
return;
s = zalloc(sizeof(struct OpalIoPhb4ErrorData));
+ if (!s) {
+ PHBERR(p, "Failed to allocate error info !\n");
+ return;
+ }
phb4_read_phb_status(p, s);
