storage/stream: allow NULL data pointer
This is done to support the idiomatic way of performing flush operations, where the caller might not have access to the proper data pointer. Also, there is no reason why reading from address 0 should not be allowed. Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
This commit is contained in:
parent
38f623d97c
commit
a4957be25b
2 changed files with 13 additions and 1 deletions
|
@ -115,7 +115,7 @@ int stream_flash_buffered_write(struct stream_flash_ctx *ctx, const uint8_t *dat
|
|||
size_t fill_length;
|
||||
uint8_t filler;
|
||||
|
||||
if (!ctx || !data) {
|
||||
if (!ctx) {
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue