Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/68231 )
Change subject: rayer_spi.c: Move rget_io_perms() check to pre-amble ......................................................................
rayer_spi.c: Move rget_io_perms() check to pre-amble
Move the 'rget_io_perms()' check to the pre-amble of the main 'rayer_spi_init()' entry-point. If we do not have the required permissions there is no need to continue.
Change-Id: Ieb0a494bd49f6986e9ac230b7b123329493a82bc Signed-off-by: Edward O'Callaghan quasisec@google.com --- M rayer_spi.c 1 file changed, 17 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/31/68231/1
diff --git a/rayer_spi.c b/rayer_spi.c index 8632f8c..a64496d 100644 --- a/rayer_spi.c +++ b/rayer_spi.c @@ -286,6 +286,9 @@ uint8_t lpt_outbyte; char *prog_type;
+ if (rget_io_perms()) + return 1; + if (get_params(cfg, &lpt_iobase, &prog_type) < 0) return 1;
@@ -309,9 +312,6 @@ msg_pinfo("Using %s pinout.\n", prog->description); pinout = (struct rayer_pinout *)prog->dev_data;
- if (rget_io_perms()) - return 1; - /* Get the initial value before writing to any line. */ lpt_outbyte = INB(lpt_iobase);