flashrom.c: Sort initial error checks in create_erase_layout()

With the original order, we might report the wrong error in case
calloc() returns `NULL` for `nmemb == 0`.

Change-Id: If1330ab1cbde817fb7ef91f7dc6ace219cb6ecbc
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72555
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
1 file changed