Commit 82e6afd4 authored by Bart Van Assche's avatar Bart Van Assche Committed by James Bottomley

qla2xxx: Remove a superfluous test

Avoid that smatch reports the following warning:

drivers/scsi/qla2xxx/qla_attr.c:1081: qla2x00_model_desc_show() warn: this array is probably non-NULL. 'vha->hw->model_desc'
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Acked-by: default avatarHimanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent 8dfa4b5a
...@@ -1077,8 +1077,7 @@ qla2x00_model_desc_show(struct device *dev, struct device_attribute *attr, ...@@ -1077,8 +1077,7 @@ qla2x00_model_desc_show(struct device *dev, struct device_attribute *attr,
char *buf) char *buf)
{ {
scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
return scnprintf(buf, PAGE_SIZE, "%s\n", return scnprintf(buf, PAGE_SIZE, "%s\n", vha->hw->model_desc);
vha->hw->model_desc ? vha->hw->model_desc : "");
} }
static ssize_t static ssize_t
......
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