Re: [PATCH v3 5/9] mtd: nand: tmio_nand.c: take in account partition parser types

From: Wolfram Sang
Date: Thu Jun 01 2017 - 04:37:57 EST



> - retval = mtd_device_parse_register(mtd, NULL, NULL,
> + retval = mtd_device_parse_register(mtd,
> + data->types ? data->types : NULL,

This is superfluous. You want to check against 'data' instead as it is
done below. Otherwis you might get a NULL pointer dereference.

> + NULL,
> data ? data->partition : NULL,
> data ? data->num_partitions : 0);

Attachment: signature.asc
Description: PGP signature