qla2xxx: Remove a superfluous test
authorBart Van Assche <bart.vanassche@sandisk.com>
Thu, 9 Jul 2015 14:25:07 +0000 (07:25 -0700)
committerJames Bottomley <JBottomley@Odin.com>
Wed, 26 Aug 2015 17:44:07 +0000 (10:44 -0700)
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: Bart Van Assche <bart.vanassche@sandisk.com>
Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/qla2xxx/qla_attr.c

index 741d6e0f4060330eb30fce72fc4aaeea207caee5..2087b73927ce72eea11d791fb47e9e7c84bc5956 100644 (file)
@@ -1077,8 +1077,7 @@ qla2x00_model_desc_show(struct device *dev, struct device_attribute *attr,
                        char *buf)
 {
        scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
-       return scnprintf(buf, PAGE_SIZE, "%s\n",
-           vha->hw->model_desc ? vha->hw->model_desc : "");
+       return scnprintf(buf, PAGE_SIZE, "%s\n", vha->hw->model_desc);
 }
 
 static ssize_t