]> git.dujemihanovic.xyz Git - u-boot.git/commit
sf: Guard against zero erasesize
authorSimon Glass <sjg@chromium.org>
Thu, 4 May 2023 22:50:47 +0000 (16:50 -0600)
committerBin Meng <bmeng@tinylab.org>
Thu, 11 May 2023 02:25:29 +0000 (10:25 +0800)
commit28afcb1e7f7d1b899514cbdb58fb658ee0b5c5a3
tree4d173663af99e0362599bfb1d8155037481c72c6
parentf2fac8b5571b2537cf499bab9a7962e19f64e9de
sf: Guard against zero erasesize

With tiny SPI flash the erasesize is 0 which can cause a divide-by-zero
error. Check for this and return a proper error instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/mtd/spi/sf_probe.c