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:
Håkon Øye Amundsen 2020-05-28 09:23:51 +02:00 committed by Carles Cufí
commit a4957be25b
2 changed files with 13 additions and 1 deletions

View file

@ -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;
}