Commit 47af41b0 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman

staging: most: fix misplaced constants in comparisons

This patch removes and fixes constants being misplaced in comparisons.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ba170ee2
...@@ -938,7 +938,7 @@ most_c_obj *get_channel_by_name(char *mdev, char *mdev_ch) ...@@ -938,7 +938,7 @@ most_c_obj *get_channel_by_name(char *mdev, char *mdev_ch)
break; break;
} }
} }
if (unlikely(2 > found)) if (unlikely(found < 2))
return ERR_PTR(-EIO); return ERR_PTR(-EIO);
return c; return c;
} }
...@@ -1561,7 +1561,7 @@ int most_start_channel(struct most_interface *iface, int id, ...@@ -1561,7 +1561,7 @@ int most_start_channel(struct most_interface *iface, int id,
else else
num_buffer = arm_mbo_chain(c, c->cfg.direction, num_buffer = arm_mbo_chain(c, c->cfg.direction,
most_write_completion); most_write_completion);
if (unlikely(0 == num_buffer)) { if (unlikely(!num_buffer)) {
pr_info("failed to allocate memory\n"); pr_info("failed to allocate memory\n");
ret = -ENOMEM; ret = -ENOMEM;
goto error; goto error;
......
Markdown is supported
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