iommu/amd: Don't use IS_ERR_VALUE to check integer values
Use the better 'var < 0' check.
Fixes: 7aba6cb9ee9d ('iommu/amd: Make call-sites of get_device_id aware of its return value')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 12f7779..a2a51c1 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -354,7 +354,7 @@
int devid;
devid = get_device_id(dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return;
list_for_each_entry(e, &amd_iommu_unity_map, list) {
@@ -376,7 +376,7 @@
return false;
devid = get_device_id(dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return false;
/* Out of our scope? */
@@ -419,7 +419,7 @@
return 0;
devid = get_device_id(dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return devid;
dev_data = find_dev_data(devid);
@@ -447,7 +447,7 @@
int devid;
devid = get_device_id(dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return;
alias = amd_iommu_alias_table[devid];
@@ -465,7 +465,7 @@
struct iommu_dev_data *dev_data;
devid = get_device_id(dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return;
dev_data = search_dev_data(devid);
@@ -2414,7 +2414,7 @@
return 0;
devid = get_device_id(dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return devid;
iommu = amd_iommu_rlookup_table[devid];
@@ -2460,7 +2460,7 @@
return;
devid = get_device_id(dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return;
iommu = amd_iommu_rlookup_table[devid];
@@ -3158,7 +3158,7 @@
return;
devid = get_device_id(dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return;
if (dev_data->domain != NULL)
@@ -3280,7 +3280,7 @@
int devid;
devid = get_device_id(dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return;
list_for_each_entry(entry, &amd_iommu_unity_map, list) {
@@ -3983,7 +3983,7 @@
case X86_IRQ_ALLOC_TYPE_MSI:
case X86_IRQ_ALLOC_TYPE_MSIX:
devid = get_device_id(&info->msi_dev->dev);
- if (IS_ERR_VALUE(devid))
+ if (devid < 0)
return NULL;
iommu = amd_iommu_rlookup_table[devid];