summaryrefslogtreecommitdiff
path: root/drivers/staging/most
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2015-10-15 13:28:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-16 23:09:41 -0700
commit47af41b0d9c078a8f093d418464de6083bd4e80d (patch)
tree77081c84881f84ee419c5e948435e8f6767ee6f9 /drivers/staging/most
parentba170ee2b95f53d6e973b63860a4bb80c3140ff4 (diff)
staging: most: fix misplaced constants in comparisons
This patch removes and fixes constants being misplaced in comparisons. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r--drivers/staging/most/mostcore/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
index 1905547bf990..ca32b2147afa 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -938,7 +938,7 @@ most_c_obj *get_channel_by_name(char *mdev, char *mdev_ch)
break;
}
}
- if (unlikely(2 > found))
+ if (unlikely(found < 2))
return ERR_PTR(-EIO);
return c;
}
@@ -1561,7 +1561,7 @@ int most_start_channel(struct most_interface *iface, int id,
else
num_buffer = arm_mbo_chain(c, c->cfg.direction,
most_write_completion);
- if (unlikely(0 == num_buffer)) {
+ if (unlikely(!num_buffer)) {
pr_info("failed to allocate memory\n");
ret = -ENOMEM;
goto error;