mtd: rawnand: nandsim: Clean error handling
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 25 May 2020 08:58:38 +0000 (10:58 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 31 May 2020 08:53:37 +0000 (10:53 +0200)
commit052a7a5374bc1e41dd1588fcb861ec3d810fd160
treeb1f05b7dbffdbb20b5e0b5c55abc3a70a35e18fa
parent88f9f3e89a8ad1594c4d9c599bdf9c904e3976fe
mtd: rawnand: nandsim: Clean error handling

Many function calls are done this way:

        if ((retval = func()) != 0)
        return retval;

while we expect in the kernel function calls like:

        retval = func();
if (retval)
        return retval;

Apply this change where possible and also use "ret" instead of
"retval" in ns_init_module for consistency, as it is only used in this
function.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200525085851.17682-5-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/nandsim.c