commit | 84a1c2109d23df3543d96231c4fee1757299bb1a | [log] [tgz] |
---|---|---|
author | huijin.park <huijin.park@samsung.com> | Wed Nov 28 03:02:14 2018 -0500 |
committer | Boris Brezillon <boris.brezillon@bootlin.com> | Mon Dec 10 21:59:07 2018 +0100 |
tree | e025f78f761dd94e0a503ab52437e1c4b6f9b65d | |
parent | 4cc106f8f245bae0c458224804733240cb22394d [diff] |
mtd: spi-nor: cast to u64 to avoid uint overflows The "params->size" is defined as "u64". And "info->sector_size" and "info->n_sectors" are defined as unsigned int and u16. Thus, u64 data might have strange data(loss data) if the result overflows an unsigned int. This patch casts "info->sector_size" to an u64. Signed-off-by: huijin.park <huijin.park@samsung.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>