On Wed,  6 Jun 2012 10:18:00 +0200
Niklas Söderlund <[email protected]> wrote:

> @@ -491,7 +499,8 @@ int serprog_init(void)
>                  the programmer to tell us its limits, but if it doesn't, we
>                  will assume stuff, so it's in the programmers best interest
>                  to tell us. */
> -             sp_docommand(S_CMD_S_BUSTYPE, 1, &bt, 0, NULL);
> +             if (sp_docommand(S_CMD_S_BUSTYPE, 1, &bt, 0, NULL))
> +                     return 1;
>               if (!sp_docommand(S_CMD_Q_WRNMAXLEN, 0, NULL, 3, rbuf)) {
>                       uint32_t v;
>                       v = ((unsigned int)(rbuf[0]) << 0);
> @@ -513,7 +522,8 @@ int serprog_init(void)
>                       msg_pdbg(MSGHEADER "Maximum read-n length is %d\n", v);
>               }
>               bt = serprog_buses_supported;
> -             sp_docommand(S_CMD_S_BUSTYPE, 1, &bt, 0, NULL);
> +             if (sp_docommand(S_CMD_S_BUSTYPE, 1, &bt, 0, NULL))
> +                     return 1;
>       }

those calls actually change the behavior, because it was previously ok
if they fail (which is arguably correct), i decided to change them
anyway because the if before guards older correct implementations
against this anyway. i just moved the first one above the comment
because it would contradict it otherwise.

thanks!
Acked-by: Stefan Tauner <[email protected]>
and applied in r1557

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to