[PATCH 3/3] mtd-utils: nandwrite: Large page+oob support

Mike Frysinger vapier.adi at gmail.com
Fri Oct 15 14:58:09 EDT 2010


On Fri, Oct 15, 2010 at 03:44, Brian Norris wrote:
> +       oobbuf = (unsigned char *)malloc(meminfo.oobsize);

include common.h and use xmalloc.  also, the malloc cast is useless, so drop it.
> -       if (filebuf) {
> +       if (filebuf)
>                free(filebuf);
> -       }
> +       if (oobbuf)
> +               free(oobbuf);

free(NULL) works fine, so drop the "if" check.
-mike



More information about the linux-mtd mailing list