]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mtd: spi-nor: silently drop lock/unlock for already locked/unlocked region
authorBrian Norris <computersforpeace@gmail.com>
Fri, 29 Jan 2016 19:25:31 +0000 (11:25 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 8 Mar 2016 02:01:54 +0000 (18:01 -0800)
commit4c0dba447ef4a97dfbae6e876312e952667eddc4
tree631c6a9caa023a440db842ffbd7562adaaff6aa6
parentedf891ef9ab773363f8e58022a26d7d31604aed6
mtd: spi-nor: silently drop lock/unlock for already locked/unlocked region

If, for instance, the entire flash is already unlocked and I try to
mtd_unlock() the entire device, I don't expect to see an EINVAL error.
It should just silently succeed. Ditto for mtd_lock().

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
drivers/mtd/spi-nor/spi-nor.c