diff options
Diffstat (limited to '')
-rw-r--r-- | fs/pstore/zone.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/pstore/zone.c b/fs/pstore/zone.c index 2770746bb..abca11772 100644 --- a/fs/pstore/zone.c +++ b/fs/pstore/zone.c @@ -973,6 +973,8 @@ static ssize_t psz_kmsg_read(struct pstore_zone *zone, char *buf = kasprintf(GFP_KERNEL, "%s: Total %d times\n", kmsg_dump_reason_str(record->reason), record->count); + if (!buf) + return -ENOMEM; hlen = strlen(buf); record->buf = krealloc(buf, hlen + size, GFP_KERNEL); if (!record->buf) { |