diff options
author | Michael Walle <[email protected]> | 2021-07-07 15:53:59 +0200 |
---|---|---|
committer | Miquel Raynal <[email protected]> | 2021-07-16 00:49:20 +0200 |
commit | 45bb1faa29effbd4ca4d581b32373f2eda309b95 (patch) | |
tree | ee934932444c72b525570c029262069bcc21cd9f /lib/test_overflow.c | |
parent | e83862ee1b9b1668826683f432b041875ec0c819 (diff) |
mtd: core: handle flashes without OTP gracefully
There are flash drivers which registers the OTP callbacks although the
flash doesn't support OTP regions and return -ENODATA for these
callbacks if there is no OTP. If this happens, the probe of the whole
flash will fail. Fix it by handling the ENODATA return code and skip
the OTP region nvmem setup.
Fixes: 4b361cfa8624 ("mtd: core: add OTP nvmem provider support")
Reported-by: Guenter Roeck <[email protected]>
Signed-off-by: Michael Walle <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions