summaryrefslogtreecommitdiff
path: root/drivers/mtd/parsers
diff options
context:
space:
mode:
authoryangerkun <yangerkun@huawei.com>2021-01-25 15:49:36 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-01-27 15:45:51 +0300
commitdc2b3e5cbc8087224fcd8698b0dc56131e0bf37d (patch)
treef39ced906d2ac3bb5a5453d2ae46086916ed1202 /drivers/mtd/parsers
parentb81770a7007c4286880ed4b182e22b1897f27cfe (diff)
downloadlinux-dc2b3e5cbc8087224fcd8698b0dc56131e0bf37d.tar.xz
mtd: phram: use div_u64_rem to stop overwrite len in phram_setup
We now support user to set erase page size, and use do_div between len and erase size to determine the reasonableness for the erase size. However, do_div is a macro and will overwrite the value of len. Which results a mtd device with unexcepted size. Fix it by use div_u64_rem. Fixes: ffad560394de ("mtd: phram: Allow the user to set the erase page size.") Signed-off-by: yangerkun <yangerkun@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210125124936.651812-1-yangerkun@huawei.com
Diffstat (limited to 'drivers/mtd/parsers')
0 files changed, 0 insertions, 0 deletions