Skip to content
Commit aa5d20aa authored by Dominik Ermel's avatar Dominik Ermel Committed by Carles Cufí
Browse files

storage/flash_map: Return -ENODEV from flash_area_open



The commit adds check, to flash_area_open, whether there is any
device driver attached and returns -ENODEV if there isn't any.
This works around a problem where flash_area_open succeeds but
consecutive read/write causes crash.
It is enough to check the condition, and return error, here as
the flash_area_open has to precede, and be checked for success,
any read/write operations.

Signed-off-by: default avatarDominik Ermel <dominik.ermel@nordicsemi.no>
parent 8b7ec919
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment