diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_mbox.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 7256be3f4e2f..6b64e573ad4e 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -288,8 +288,10 @@ lpfc_read_sparam(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, int vpi) | |||
288 | 288 | ||
289 | /* Get a buffer to hold the HBAs Service Parameters */ | 289 | /* Get a buffer to hold the HBAs Service Parameters */ |
290 | 290 | ||
291 | if (((mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == 0) || | 291 | mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL); |
292 | ((mp->virt = lpfc_mbuf_alloc(phba, 0, &(mp->phys))) == 0)) { | 292 | if (mp) |
293 | mp->virt = lpfc_mbuf_alloc(phba, 0, &mp->phys); | ||
294 | if (!mp || !mp->virt) { | ||
293 | kfree(mp); | 295 | kfree(mp); |
294 | mb->mbxCommand = MBX_READ_SPARM64; | 296 | mb->mbxCommand = MBX_READ_SPARM64; |
295 | /* READ_SPARAM: no buffers */ | 297 | /* READ_SPARAM: no buffers */ |
@@ -387,8 +389,10 @@ lpfc_reg_login(struct lpfc_hba *phba, uint16_t vpi, uint32_t did, | |||
387 | mb->mbxOwner = OWN_HOST; | 389 | mb->mbxOwner = OWN_HOST; |
388 | 390 | ||
389 | /* Get a buffer to hold NPorts Service Parameters */ | 391 | /* Get a buffer to hold NPorts Service Parameters */ |
390 | if (((mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == NULL) || | 392 | mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL); |
391 | ((mp->virt = lpfc_mbuf_alloc(phba, 0, &(mp->phys))) == 0)) { | 393 | if (mp) |
394 | mp->virt = lpfc_mbuf_alloc(phba, 0, &mp->phys); | ||
395 | if (!mp || !mp->virt) { | ||
392 | kfree(mp); | 396 | kfree(mp); |
393 | mb->mbxCommand = MBX_REG_LOGIN64; | 397 | mb->mbxCommand = MBX_REG_LOGIN64; |
394 | /* REG_LOGIN: no buffers */ | 398 | /* REG_LOGIN: no buffers */ |