[PATCH 1/6] mtd: nand: Check length of ID before reading bits per cell

Daniel Ehrenberg dehrenberg at chromium.org
Fri Dec 12 16:51:01 PST 2014


On Tue, Dec 2, 2014 at 4:58 AM, Ezequiel Garcia
<ezequiel.garcia at imgtec.com> wrote:
> The table-based NAND identification currently reads the number
> of bits per cell from the 3rd byte of the extended ID. This is done
> for the so-called 'full ID' devices; i.e. devices that have a known
> length ID.
>
> However, if the ID length is shorter than three, there's no 3rd byte,
> and so it's wrong to read the bits per cell from there. Fix this by
> adding a check for the ID length.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia at imgtec.com>

Reviewed-by: Dan Ehrenberg <dehrenberg at chromium.org>



More information about the linux-mtd mailing list