]> git.baikalelectronics.ru Git - uboot.git/commit
mtd: spi-nor-core: Fix static checker warnings
authorVignesh Raghavendra <vigneshr@ti.com>
Sat, 9 Nov 2019 06:34:13 +0000 (12:04 +0530)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 27 Dec 2019 12:17:26 +0000 (17:47 +0530)
commitf4aa6b3b01e53330bda6241e21a729ab8f27c084
tree6bd75d3876e7732bee51c8cc8bef784a638d54e5
parent7643e14b945c6e94444d3c0835685d15a5aa10f3
mtd: spi-nor-core: Fix static checker warnings

Static checker warns 'ret' variable may be used uninitialized in
spi_nor_erase() and spi_nor_write() in case of zero length requests.
Fix these warnings by checking for zero length requests and returning
early.

Reported-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
drivers/mtd/spi/spi-nor-core.c