ft2232_spi: Fix resource leaking on failed init

Move the allocation of `spi_data` down. OOM errors are less likely,
hence it won't hurt to check that late. OTOH, it simplifies error
handling when we separate init parts that require dynamic resources
from those that don't.

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