Skip to content

Commit

Permalink
nandsim: Fix return code testing of ns_find_operation()
Browse files Browse the repository at this point in the history
ns_find_operation() returns 0 on success.

Fixes: 052a7a5 ("mtd: rawnand: nandsim: Clean error handling")
Signed-off-by: Richard Weinberger <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
  • Loading branch information
richardweinberger authored and miquelraynal committed Jun 15, 2020
1 parent b3a9e3b commit 1f6ce44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/raw/nandsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ static void ns_switch_state(struct nandsim *ns)

NS_DBG("switch_state: operation is unknown, try to find it\n");

if (!ns_find_operation(ns, 0))
if (ns_find_operation(ns, 0))
return;

if ((ns->state & ACTION_MASK) &&
Expand Down

0 comments on commit 1f6ce44

Please sign in to comment.