From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933402AbeAHXLk (ORCPT + 1 other); Mon, 8 Jan 2018 18:11:40 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33860 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933348AbeAHXLg (ORCPT ); Mon, 8 Jan 2018 18:11:36 -0500 X-Google-Smtp-Source: ACJfBouY+3Mi2SSKok2w2FcMVKA5q3SR22tFsYIpvqmQSGLkJwaQu0oLYzrDtgO+andPyz4EEyaxJA== From: Rasmus Villemoes To: Satish Kharat , Sesidhar Baddela , Karan Tilak Kumar , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Rasmus Villemoes , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: fnic: use kzalloc in fnic_fcoe_process_vlan_resp Date: Tue, 9 Jan 2018 00:11:15 +0100 Message-Id: <20180108231115.17459-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: This saves a little .text and gets rid of the unmotivated line break and the sizeof(...) style inconsistency. Signed-off-by: Rasmus Villemoes --- drivers/scsi/fnic/fnic_fcs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c index 999fc7547560..c7bf316d8e83 100644 --- a/drivers/scsi/fnic/fnic_fcs.c +++ b/drivers/scsi/fnic/fnic_fcs.c @@ -442,15 +442,13 @@ static void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct sk_buff *skb) vid = ntohs(((struct fip_vlan_desc *)desc)->fd_vlan); shost_printk(KERN_INFO, fnic->lport->host, "process_vlan_resp: FIP VLAN %d\n", vid); - vlan = kmalloc(sizeof(*vlan), - GFP_ATOMIC); + vlan = kzalloc(sizeof(*vlan), GFP_ATOMIC); if (!vlan) { /* retry from timer */ spin_unlock_irqrestore(&fnic->vlans_lock, flags); goto out; } - memset(vlan, 0, sizeof(struct fcoe_vlan)); vlan->vid = vid & 0x0fff; vlan->state = FIP_VLAN_AVAIL; list_add_tail(&vlan->list, &fnic->vlans); -- 2.15.1