mtd: rawnand: qcom: fix null pointer access for erased page detection
authorAbhishek Sahu <absahu@codeaurora.org>
Wed, 20 Jun 2018 07:27:35 +0000 (12:57 +0530)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 18 Jul 2018 07:24:07 +0000 (09:24 +0200)
commit2f610386736d9e5dc69fa06374138f9712690921
treed8de43e97eb20445248b71974c3b3697cdbdbf7d
parent8eab72148808a74535c3322f6ca30aba77d2d4a9
mtd: rawnand: qcom: fix null pointer access for erased page detection

parse_read_errors can be called with only oob_buf in which case
data_buf will be NULL.  If data_buf is NULL, then don’t
treat this page as completely erased in case of ECC uncorrectable
error for RS ECC. For BCH ECC, the controller itself tells
regarding erased page in status register.

Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/qcom_nandc.c