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

Wolfram Sang wsa at the-dreams.de
Thu Jun 1 01:37:49 PDT 2017


> -	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);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20170601/b87a7b74/attachment.sig>


More information about the linux-mtd mailing list