> The __einj_error_inject() function allocates memory via kmalloc() > without checking for allocation failure, which could lead to a > NULL pointer dereference. > > Return -ENOMEM in case allocation fails. > > Fixes: b47610296d17 ("ACPI: APEI: EINJ: Enable EINJv2 error injections") > Signed-off-by: Charles Han <hanchunchao@xxxxxxxxxx> Reviewed-by: Tony Luck <tony.luck@xxxxxxxxx> -Tony