Convert the cmd_timeou_ms to u64 to avoid overflow
Signed-off-by: Jerry Huang <[email protected]>
Signed-off-by: Haijun Zhang <[email protected]>
CC: Anton Vorontsov <[email protected]>
CC: Chris Ball <[email protected]>
---
drivers/mmc/card/block.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 21056b9..51903de 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -469,7 +469,8 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev,
* mrq.data = NULL;
* cmd.cmd_timeout = idata->ic.cmd_timeout_ms;
*/
- data.timeout_ns = idata->ic.cmd_timeout_ms * 1000000;
+ data.timeout_ns = (u64)idata->ic.cmd_timeout_ms *
+ 1000000;
}
mrq.data = &data;
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html