From patchwork Thu Mar 11 16:17:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 84958 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2BGHpCb016150 for ; Thu, 11 Mar 2010 16:17:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933173Ab0CKQRu (ORCPT ); Thu, 11 Mar 2010 11:17:50 -0500 Received: from smtp.nokia.com ([192.100.105.134]:24621 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933136Ab0CKQRu (ORCPT ); Thu, 11 Mar 2010 11:17:50 -0500 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o2BGHSlp031289; Thu, 11 Mar 2010 10:17:46 -0600 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Mar 2010 18:17:31 +0200 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Mar 2010 18:17:30 +0200 Received: from localhost.localdomain (esdhcp040205.research.nokia.com [172.21.40.205]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o2BGHTjs020966; Thu, 11 Mar 2010 18:17:29 +0200 From: Jani Nikula To: rolandd@cisco.com, sean.hefty@intel.com, hal.rosenstock@gmail.com Cc: linux-rdma@vger.kernel.org, ext-jani.1.nikula@nokia.com Subject: [PATCH] IB/cm: fix device_create() return value check Date: Thu, 11 Mar 2010 18:17:28 +0200 Message-Id: <1268324248-30394-1-git-send-email-ext-jani.1.nikula@nokia.com> X-Mailer: git-send-email 1.6.5.2 X-OriginalArrivalTime: 11 Mar 2010 16:17:31.0032 (UTC) FILETIME=[59AC0180:01CAC136] X-Nokia-AV: Clean Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 11 Mar 2010 16:17:59 +0000 (UTC) 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; }