[PATCH] I2O: Optimizing
[firefly-linux-kernel-4.4.55.git] / drivers / message / i2o / i2o_config.c
index 286fef3240c491d25900ded25106e9c9388d77b8..89daf67b764dc6006066c15dad4bde7d09f0edb1 100644 (file)
@@ -583,13 +583,12 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd,
        reply_size >>= 16;
        reply_size <<= 2;
 
-       reply = kmalloc(reply_size, GFP_KERNEL);
+       reply = kzalloc(reply_size, GFP_KERNEL);
        if (!reply) {
                printk(KERN_WARNING "%s: Could not allocate reply buffer\n",
                       c->name);
                return -ENOMEM;
        }
-       memset(reply, 0, reply_size);
 
        sg_offset = (msg->u.head[0] >> 4) & 0x0f;
 
@@ -817,13 +816,12 @@ static int i2o_cfg_passthru(unsigned long arg)
        reply_size >>= 16;
        reply_size <<= 2;
 
-       reply = kmalloc(reply_size, GFP_KERNEL);
+       reply = kzalloc(reply_size, GFP_KERNEL);
        if (!reply) {
                printk(KERN_WARNING "%s: Could not allocate reply buffer\n",
                       c->name);
                return -ENOMEM;
        }
-       memset(reply, 0, reply_size);
 
        sg_offset = (msg->u.head[0] >> 4) & 0x0f;