summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJani Nikula <ext-jani.1.nikula@nokia.com>2010-03-11 16:17:28 +0000
committerRoland Dreier <rolandd@cisco.com>2010-03-31 14:26:52 -0700
commit3e340c05c0def3bb68db6751299b7821c2ba0621 (patch)
tree80842344ef8689c8e44307bedbfa719fbb30322a /drivers/infiniband
parentb72c40949b0f04728f2993a1434598d3bad094ea (diff)
downloadlinux-3.10-3e340c05c0def3bb68db6751299b7821c2ba0621.tar.gz
linux-3.10-3e340c05c0def3bb68db6751299b7821c2ba0621.tar.bz2
linux-3.10-3e340c05c0def3bb68db6751299b7821c2ba0621.zip
IB/cm: Fix device_create() return value check
Use IS_ERR() instead of comparing to NULL. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/cm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 764787ebe8d..c9730cb3f69 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -3693,7 +3693,7 @@ static void cm_add_one(struct ib_device *ib_device)
cm_dev->device = device_create(&cm_class, &ib_device->dev,
MKDEV(0, 0), NULL,
"%s", ib_device->name);
- if (!cm_dev->device) {
+ if (IS_ERR(cm_dev->device)) {
kfree(cm_dev);
return;
}