Skip to content
Commit 052a7a53 authored by Miquel Raynal's avatar Miquel Raynal
Browse files

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: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200525085851.17682-5-miquel.raynal@bootlin.com
parent 88f9f3e8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment