|
@@ -560,7 +560,8 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index,
|
|
|
}
|
|
|
|
|
|
if (page_zero_filled(uncmem)) {
|
|
|
- kunmap_atomic(user_mem);
|
|
|
+ if (user_mem)
|
|
|
+ kunmap_atomic(user_mem);
|
|
|
/* Free memory associated with this sector now. */
|
|
|
bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value);
|
|
|
zram_free_page(zram, index);
|