Skip to content
Snippets Groups Projects
Commit 439fcb9b authored by Bin Meng's avatar Bin Meng Committed by Tom Rini
Browse files

sf: Fix NULL pointer exception for flashes without lock methods


commit c3c016cf "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: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: default avatarJagan Teki <jteki@openedev.com>
parent 9ac4fc82
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment