mtd: spi: don't return -1 when scan succeed
authorFabien Parent <fparent@baylibre.com>
Mon, 5 Dec 2016 18:09:10 +0000 (19:09 +0100)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 15 Dec 2016 15:57:28 +0000 (16:57 +0100)
commit304decdd31d54ae274f785fb086f3f6ae30a8711
treeed9e477cd133459490c0dbd5fab4582636961cb0
parent6d72810c6640e13b4c1e25f6c26ac8c304d5b54e
mtd: spi: don't return -1 when scan succeed

In spi_flash_scan, 'ret' is initialled to -1, but 'ret' is not always
used to store a return value, in that case, even when the function
succeed, an error (-1) will be returned.
Lets just return 0 if we hit the end of the function.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/mtd/spi/spi_flash.c