[PATCH v2] libmtd: avoid divide by zero

Richard Weinberger richard.weinberger at gmail.com
Fri Nov 27 09:03:18 EST 2020


On Fri, Nov 27, 2020 at 1:16 AM Chris Packham
<chris.packham at alliedtelesis.co.nz> wrote:
>
> The concept of erase blocks doesn't apply to mtd-ram devices. Such
> devices set MTD_NO_ERASE to indicate this and some report 0 for the
> erase block size. Avoid a divide by zero when calculating the erase
> block count for such devices.
>
> Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>

Acked-by: Richard Weinberger <richard at nod.at>

-- 
Thanks,
//richard



More information about the linux-mtd mailing list