spi: spi-mem: Fix inverted logic in op sanity check
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 25 Sep 2018 09:46:55 +0000 (11:46 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 27 Sep 2018 22:29:57 +0000 (23:29 +0100)
commitaea3877e24f3acc6145094848dbb85f9ce85674a
treea61aad463efa773ef8326d927d00b174586f58ea
parent73569a50959e4ec63bcf05839a030e799a350de1
spi: spi-mem: Fix inverted logic in op sanity check

On r8a7791/koelsch:

    m25p80 spi0.0: error -22 reading 9f
    m25p80: probe of spi0.0 failed with error -22

Apparently the logic in spi_mem_check_op() is wrong, rejecting the
spi-mem operation if any buswidth is valid, instead of invalid.

Fixes: 380583227c0c7f52 ("spi: spi-mem: Add extra sanity checks on the op param")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mem.c