sunvdc: remove unnecessary oom message
authorZhen Lei <thunder.leizhen@huawei.com>
Wed, 9 Jun 2021 12:23:27 +0000 (20:23 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Jun 2021 15:41:52 +0000 (09:41 -0600)
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>
drivers/block/sunvdc.c

index 39aeebc..4489704 100644 (file)
@@ -1001,9 +1001,8 @@ static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
        }
 
        port = kzalloc(sizeof(*port), GFP_KERNEL);
-       err = -ENOMEM;
        if (!port) {
-               printk(KERN_ERR PFX "Cannot allocate vdc_port.\n");
+               err = -ENOMEM;
                goto err_out_release_mdesc;
        }