aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/zram/zram_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/zram/zram_drv.c')
-rw-r--r--drivers/block/zram/zram_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 011e55d820b1..51c557cfd92b 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -612,6 +612,8 @@ static ssize_t disksize_store(struct device *dev,
612 612
613 disksize = PAGE_ALIGN(disksize); 613 disksize = PAGE_ALIGN(disksize);
614 meta = zram_meta_alloc(disksize); 614 meta = zram_meta_alloc(disksize);
615 if (!meta)
616 return -ENOMEM;
615 down_write(&zram->init_lock); 617 down_write(&zram->init_lock);
616 if (zram->init_done) { 618 if (zram->init_done) {
617 up_write(&zram->init_lock); 619 up_write(&zram->init_lock);