浏览代码

target: Fix double test of inquiry_prod

The code in transport_add_device_to_core_hba() really intends to make sure
that neither inquiry_prod nor inquiry_rev is NULL.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Roland Dreier 14 年之前
父节点
当前提交
f22c119683
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/target/target_core_transport.c

+ 1 - 1
drivers/target/target_core_transport.c

@@ -1623,7 +1623,7 @@ struct se_device *transport_add_device_to_core_hba(
 	 * setup.
 	 */
 	if (dev->transport->transport_type != TRANSPORT_PLUGIN_PHBA_PDEV) {
-		if (!(inquiry_prod) || !(inquiry_prod)) {
+		if (!inquiry_prod || !inquiry_rev) {
 			printk(KERN_ERR "All non TCM/pSCSI plugins require"
 				" INQUIRY consts\n");
 			goto out;