summaryrefslogtreecommitdiff
path: root/drivers/staging/most
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2015-08-03 13:44:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-03 17:39:51 -0700
commit2ae0751007cdf2deaa87e160f28c50a00b478883 (patch)
tree2b13f242722e65f416c7b7cb43636d0c9ccaac06 /drivers/staging/most
parent948fa942dc6bb4000bdf94901e99570b7636ed7c (diff)
Staging: most: avoid possible integer overflow
This patch prevents a potential integer overlow. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
index f872dc0bc118..f4fea8cf5560 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -1260,7 +1260,7 @@ int arm_mbo_chain(struct most_c_obj *c, int dir, void (*compl)(struct mbo *))
unsigned int i;
int retval;
struct mbo *mbo;
- u16 coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len;
+ u32 coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len;
atomic_set(&c->mbo_nq_level, 0);