summaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_bsg.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2014-09-03 20:57:55 +0400
committerChristoph Hellwig <hch@lst.de>2014-09-16 20:10:12 +0400
commita2fc4aefa06d8b57b6728c1787c84fb3d3c86354 (patch)
treec7833b3e44299747314298646b5d8fa0e8bf5eb6 /drivers/scsi/lpfc/lpfc_bsg.c
parent7ba36effb666831ac3803ca5b8aed371e7d17c4e (diff)
downloadlinux-a2fc4aefa06d8b57b6728c1787c84fb3d3c86354.tar.xz
lpfc: fix high priority issues from fortify source code scan
Fixed High priority issues from lpfc given by fortify source code scan. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_bsg.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_bsg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index d236448b05b9..a58bffb3f68f 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -2827,8 +2827,10 @@ diag_cmd_data_alloc(struct lpfc_hba *phba,
size -= cnt;
}
- mlist->flag = i;
- return mlist;
+ if (mlist) {
+ mlist->flag = i;
+ return mlist;
+ }
out:
diag_cmd_data_free(phba, mlist);
return NULL;
@@ -4592,7 +4594,7 @@ sli_cfg_ext_error:
* being reset) and com-plete the job, otherwise issue the mailbox command and
* let our completion handler finish the command.
**/
-static uint32_t
+static int
lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct fc_bsg_job *job,
struct lpfc_vport *vport)
{