[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1FB5E1D5CA062146B38059374562DF72180B3E1E@TK5EX14MBXC126.redmond.corp.microsoft.com>
Date: Thu, 22 Oct 2009 16:14:31 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: "gregkh@...e.de" <gregkh@...e.de>,
Hank Janssen <hjanssen@...rosoft.com>
CC: "'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>
Subject: [PATCH] Staging: hv: Fix null pointer error after vmbus loading
From: Haiyang Zhang <haiyangz@...rosoft.com>
Fix null pointer error after vmbus loading.
Cc: Greg Kroah-Hartman <gregkh@...e.de>
Signed-off-by: Hank Janssen <hjanssen@...rosoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
---
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 582318f..11431cc 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -538,9 +538,10 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
child_device_ctx);
/* Make sure we are not registered already */
- if (strlen(dev_name(&child_device_ctx->device)) != 0) {
+ if (dev_name(&child_device_ctx->device) != NULL &&
+ strlen(dev_name(&child_device_ctx->device)) != 0) {
DPRINT_ERR(VMBUS_DRV,
- "child device (%p) already registered - busid %s",
+ "child device (%p) already registered - device name: %s",
child_device_ctx,
dev_name(&child_device_ctx->device));
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists