Commit d8b57c0a authored by Kuo-Jung Su's avatar Kuo-Jung Su Committed by Stefan Roese
Browse files

cfi_flash: use buffer length in unmap_physmem()

While the flash_detect_legacy() of drivers/mtd/cfi_flash.c
feed unmap_physmem() with MAP_NOCACHE as 2nd parameter,
the do_spi_flash_read_write() of common/cmd_sf.c
feed unmap_physmem() with the length of the mapped buffer
as 2nd parameter.

It's apparently a bug, and I personally think the 2nd parameter
should be the length of the mapped buffer.
Signed-off-by: default avatarKuo-Jung Su <>
CC: Albert Aribaud <>
CC: Stefan Roese <>
Signed-off-by: default avatarStefan Roese <>
parent 62c175fb
......@@ -1820,7 +1820,7 @@ static int flash_detect_legacy(phys_addr_t base, int banknum)
unmap_physmem((void *)info->start[0],
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment