diff options
author | Brian Norris <computersforpeace@gmail.com> | 2016-06-24 19:38:14 +0200 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2016-07-10 04:29:38 +0200 |
commit | 06586204714b7befec99e554c71687b0b40f351c (patch) | |
tree | a9b3b4af144f225b85e44567eebe7342e6d095ff /drivers/memory/fsl_ifc.c | |
parent | mtd: cfi_cmdset_0020: Deinline do_write_buffer, save 5316 bytes (diff) | |
download | linux-06586204714b7befec99e554c71687b0b40f351c.tar.xz linux-06586204714b7befec99e554c71687b0b40f351c.zip |
mtd: spi-nor: fix wrong "fully unlocked" test
In stm_unlock(), the test to determine whether we've fully unlocked the
flash checks for the lock length to be equal to the flash size. That is
a typo/think-o -- the condition actually means the flash is completely
*locked.* We should be using the inverse condition -- that the lock
length is 0 (i.e., no protection).
The result of this bug is that we never actually turn off the Status
Register Write Disable bit, even if the flash is completely unlocked.
Now we can.
Fixes: 47b8edbf0d43 ("mtd: spi-nor: disallow further writes to SR if WP# is low")
Reported-by: Giorgio <giorgio.nicole@arcor.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Diffstat (limited to 'drivers/memory/fsl_ifc.c')
0 files changed, 0 insertions, 0 deletions