From 2ae0751007cdf2deaa87e160f28c50a00b478883 Mon Sep 17 00:00:00 2001 From: Christian Gromm Date: Mon, 3 Aug 2015 13:44:30 +0200 Subject: [PATCH] Staging: most: avoid possible integer overflow This patch prevents a potential integer overlow. Reported-by: Dan Carpenter Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman --- drivers/staging/most/mostcore/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2