[U-Boot] [PATCH 2/3] mxs_ocotp: check for errors from the OTP controller after writing
Fabio Estevam
festevam at gmail.com
Sat Nov 22 20:29:11 CET 2014
On Fri, Nov 21, 2014 at 4:04 PM, Hector Palacios
<hector.palacios at digi.com> wrote:
>> What about doing this instead?
>>
>> /* Check for errors */
>> ret = readl(&ocotp_regs->hw_ocotp_ctrl) & OCOTP_CTRL_ERROR);
>> if (ret) {
>> printfs("Failed writing the fuses: %d\n", ret);
>> goto fail;
>> }
>>
>
> Although the code looks nicer you are not returning a meaningful error code, just a
> mask value (and yes, I know the error code does not get anywhere, but still).
I am just returning the real error code, not a 'fake' one :-)
More information about the U-Boot
mailing list