diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-07-11 17:10:37 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-07-22 23:44:07 +0300 |
commit | 70a51d8c53176080e82b2aef050f820ccdd4b3f8 (patch) | |
tree | 575d6ca78773b12b405c7f350713f20f58f7bd2d /drivers/scsi/lpfc/lpfc_bsg.c | |
parent | 9e5470fe2d61bd87c27c7722099bafab277f81ec (diff) | |
download | linux-70a51d8c53176080e82b2aef050f820ccdd4b3f8.tar.xz |
scsi: lpfc: Remove unnecessary null check before kfree
A null check before a kfree is redundant, so remove it. This is detected
by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_bsg.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_bsg.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index b7216d694bff..c7f66239ca70 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -1276,9 +1276,7 @@ lpfc_bsg_hba_set_event(struct bsg_job *job) return 0; /* call job done later */ job_error: - if (dd_data != NULL) - kfree(dd_data); - + kfree(dd_data); job->dd_data = NULL; return rc; } |