mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
z2ram: remove unnecessary oom message
Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
c744b06254
commit
ec1e7e8853
1 changed files with 2 additions and 8 deletions
|
@ -236,11 +236,8 @@ static int z2_open(struct block_device *bdev, fmode_t mode)
|
||||||
|
|
||||||
case Z2MINOR_Z2ONLY:
|
case Z2MINOR_Z2ONLY:
|
||||||
z2ram_map = kmalloc(max_z2_map, GFP_KERNEL);
|
z2ram_map = kmalloc(max_z2_map, GFP_KERNEL);
|
||||||
if (z2ram_map == NULL) {
|
if (!z2ram_map)
|
||||||
printk(KERN_ERR DEVICE_NAME
|
|
||||||
": cannot get mem for z2ram_map\n");
|
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
|
||||||
|
|
||||||
get_z2ram();
|
get_z2ram();
|
||||||
|
|
||||||
|
@ -253,11 +250,8 @@ static int z2_open(struct block_device *bdev, fmode_t mode)
|
||||||
|
|
||||||
case Z2MINOR_CHIPONLY:
|
case Z2MINOR_CHIPONLY:
|
||||||
z2ram_map = kmalloc(max_chip_map, GFP_KERNEL);
|
z2ram_map = kmalloc(max_chip_map, GFP_KERNEL);
|
||||||
if (z2ram_map == NULL) {
|
if (!z2ram_map)
|
||||||
printk(KERN_ERR DEVICE_NAME
|
|
||||||
": cannot get mem for z2ram_map\n");
|
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
|
||||||
|
|
||||||
get_chipram();
|
get_chipram();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue