Bin Meng 439fcb9b4f sf: Fix NULL pointer exception for flashes without lock methods
commit c3c016c "sf: Add SPI NOR protection mechanism" introduced
flash_lock()/flash_unlock()/flash_is_locked() methods for SPI flash,
but not every flash driver supplies these. We should test these
methods against NULL before actually calling them.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
2015-11-13 09:47:22 -05:00
..
2015-11-12 08:26:58 +08:00
2015-11-12 08:26:58 +08:00
2014-11-19 08:48:41 +01:00
2015-11-12 08:26:58 +08:00
2015-11-12 08:26:58 +08:00
2015-11-12 08:26:58 +08:00
2008-09-09 11:48:53 +02:00