Skip to content
Unverified Commit a0a984e1 authored by Miquel Raynal's avatar Miquel Raynal Committed by Maxime Ripard
Browse files

spl: nand: sunxi: fix second case of modulo by zero error

In the nand_read_buffer() step, the seed is calculated by doing a modulo
by conf->nseeds which is always zero when not using the randomizer (most
of SLC NANDs).

This situation turns out to lead to a run time freeze with certain
toolchains.

Derive this seed only when the randomizer is enabled (and conf->nseeds
logically not zero), exactly like what has been done before with an
identical situation, see commit ea3f750c

 ("nand: sunxi: Fix modulo
by zero error").

Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Maxime Ripard's avatarMaxime Ripard <maxime.ripard@bootlin.com>
parent f3aff376
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment