[PATCH v2 1/4] mtd: cfi_cmdset_0002: Add support for reading OTP

Artem Bityutskiy dedekind1 at gmail.com
Wed May 29 03:11:22 EDT 2013


On Fri, 2013-04-26 at 21:10 +0200, Christian Riesch wrote:
> +static int cfi_amdstd_get_fact_prot_info(struct mtd_info *mtd,
> +                                          struct otp_info *buf,
> size_t len)
> +{
> +       size_t retlen;
> +       int ret;
> +
> +       ret = cfi_amdstd_otp_walk(mtd, 0, len, &retlen, (u_char *)buf,
> NULL, 0);
> +       return ret ? : retlen;
> +}

Hmm, I thought we would return 0 in case of success and a negative error
code in case of error. Returning retlen looks wrong.

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list