mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-10-02 11:11:40 +02:00
Prior to writing to an mtd device, mtd_erase is called. This call fails in case the sector being erased is locked. Call mtd_unlock to unlock the region which is to be erased and later written to. Lock the region once the write to the region has completed. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>