diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 1daed280f1b6..6f96d8c2a711 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c @@ -119,6 +119,8 @@ ramoops_get_next_prz(struct persistent_ram_zone *przs[], uint *c, uint max, return NULL; prz = przs[i]; + if (!prz) + return NULL; /* Update old/shadowed buffer. */ if (update)