[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:31:10 CET 2014
On Sat, Nov 22, 2014 at 5:29 PM, Fabio Estevam <festevam at gmail.com> wrote:
> 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 :-)
Actually your code is correct and I misread it. Sorry about that.
More information about the U-Boot
mailing list