Commit dbc1ebe7 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Martin K. Petersen

scsi: fnic: use kzalloc in fnic_fcoe_process_vlan_resp

This saves a little .text and gets rid of the unmotivated line break and
the sizeof(...) style inconsistency.
Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 87058dde
...@@ -442,15 +442,13 @@ static void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct sk_buff *skb) ...@@ -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); vid = ntohs(((struct fip_vlan_desc *)desc)->fd_vlan);
shost_printk(KERN_INFO, fnic->lport->host, shost_printk(KERN_INFO, fnic->lport->host,
"process_vlan_resp: FIP VLAN %d\n", vid); "process_vlan_resp: FIP VLAN %d\n", vid);
vlan = kmalloc(sizeof(*vlan), vlan = kzalloc(sizeof(*vlan), GFP_ATOMIC);
GFP_ATOMIC);
if (!vlan) { if (!vlan) {
/* retry from timer */ /* retry from timer */
spin_unlock_irqrestore(&fnic->vlans_lock, spin_unlock_irqrestore(&fnic->vlans_lock,
flags); flags);
goto out; goto out;
} }
memset(vlan, 0, sizeof(struct fcoe_vlan));
vlan->vid = vid & 0x0fff; vlan->vid = vid & 0x0fff;
vlan->state = FIP_VLAN_AVAIL; vlan->state = FIP_VLAN_AVAIL;
list_add_tail(&vlan->list, &fnic->vlans); list_add_tail(&vlan->list, &fnic->vlans);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment