par_master: Fix propagation of register_par_master() return values

This patch checks return value of register_par_master()
so that in case of an error this error is not ignored anymore.

Tested: builds and ninja test

Change-Id: I377afae41708c7433a56615e2f096bce9c5349f1
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/57192
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72234
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/atapromise.c b/atapromise.c
index 881f5f1..180551b 100644
--- a/atapromise.c
+++ b/atapromise.c
@@ -140,14 +140,13 @@
 	}
 
 	max_rom_decode.parallel = rom_size;
-	register_par_master(&par_master_atapromise, BUS_PARALLEL, NULL);
 
 	msg_pwarn("Do not use this device as a generic programmer. It will leave anything outside\n"
 		  "the first %zu kB of the flash chip in an undefined state. It works fine for the\n"
 		  "purpose of updating the firmware of this device (padding may necessary).\n",
 		  rom_size / 1024);
 
-	return 0;
+	return register_par_master(&par_master_atapromise, BUS_PARALLEL, NULL);
 }
 
 static void atapromise_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr)