aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDan Carpenter2021-01-21 09:08:41 +0300
committerMartin K. Petersen2021-01-22 22:04:16 -0500
commitc750a9c9c59a85843d447910a27da21c5bcf600a (patch)
treea2be804a3d8ca46a5a89ab025dd92022ae09e783 /drivers/scsi
parent71311be1cd3e2dfd75381ef8840a88ac79256ca1 (diff)
scsi: qla2xxx: Remove unnecessary NULL check
The list iterator can't be NULL so this check is not required. Removing the check silences a Smatch warning about inconsistent NULL checking. drivers/scsi/qla2xxx/qla_dfs.c:371 qla_dfs_tgt_counters_show() error: we previously assumed 'fcport' could be null (see line 372) Link: https://lore.kernel.org/r/YAkaaSrhn1mFqyHy@mwanda Acked-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_dfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c
index ccce0eab844e..85bd0e468d43 100644
--- a/drivers/scsi/qla2xxx/qla_dfs.c
+++ b/drivers/scsi/qla2xxx/qla_dfs.c
@@ -369,7 +369,7 @@ qla_dfs_tgt_counters_show(struct seq_file *s, void *unused)
seq_puts(s, "\n");
list_for_each_entry(fcport, &vha->vp_fcports, list) {
- if (!fcport || !fcport->rport)
+ if (!fcport->rport)
continue;
seq_printf(s, "Target Num = %7d Link Down Count = %14lld\n",