>From: Jani Nikula <ext-jani.1.nik...@nokia.com>
>
>Use IS_ERR() instead of comparing to NULL.
>
>Signed-off-by: Jani Nikula <ext-jani.1.nik...@nokia.com>
>
>---
>
>NOTE: I'm afraid I'm unable to test this; please consider this more a
>bug report than a complete patch.

This looks correct to me.  Good catch.

>---
> drivers/infiniband/core/cm.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
>index 764787e..c9730cb 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;
>       }
>--
>1.6.5.2


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to