summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2008-04-16 21:01:09 -0700
committerRoland Dreier <rolandd@cisco.com>2008-04-16 21:01:09 -0700
commit5bd8341ce2bb5ef575b3501a8c13f22ae9f0b2ad (patch)
treead0c12081def59e22acf9aaccc1a70284ecf7444 /drivers/infiniband/hw/nes
parenta7dab9e887ce37391f004ffd6ce0ffed7272fd69 (diff)
RDMA/nes: Remove redundant NULL check in nes_unregister_ofa_device()
nes_unregister_ofa_device() dereferences the nesibdev pointer before testing if it's NULL. Also, the test is doubly redundant because the only caller of nes_unregister_ofa_device() is nes_destroy_ofa_device(), which already tests if nesibdev is NULL. Remove the unnecessary test. This was spotted by the Coverity checker (CID 2190). Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index a651e9d9f0e..90fa06e4c9f 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -3900,9 +3900,6 @@ void nes_unregister_ofa_device(struct nes_ib_device *nesibdev)
struct nes_vnic *nesvnic = nesibdev->nesvnic;
int i;
- if (nesibdev == NULL)
- return;
-
for (i = 0; i < ARRAY_SIZE(nes_class_attributes); ++i) {
class_device_remove_file(&nesibdev->ibdev.class_dev, nes_class_attributes[i]);
}