aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMilan Dadok <milan@dadok.name>2009-10-28 18:23:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-10-30 17:47:43 -0400
commit9fb5cce4d6a24a3c1b3d567f77ba991efdf72796 (patch)
treed70722acd7501d22531ed2543bd8ca0ade949226 /drivers
parent78f98ba9cef4cad6122fc88efd18c2771844df98 (diff)
Staging: hv: fix oops in vmbus - udev events
Fix typos in udev event send and guid variables copy Signed-off-by: Milan Dadok <milan@dadok.name> Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/hv/vmbus_drv.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 270fb7f64d75..894eecfc63ca 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -507,12 +507,12 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
507 507
508 child_device_obj = &child_device_ctx->device_obj; 508 child_device_obj = &child_device_ctx->device_obj;
509 child_device_obj->context = context; 509 child_device_obj->context = context;
510 memcpy(&child_device_obj->deviceType, &type, sizeof(struct hv_guid)); 510 memcpy(&child_device_obj->deviceType, type, sizeof(struct hv_guid));
511 memcpy(&child_device_obj->deviceInstance, &instance, 511 memcpy(&child_device_obj->deviceInstance, instance,
512 sizeof(struct hv_guid)); 512 sizeof(struct hv_guid));
513 513
514 memcpy(&child_device_ctx->class_id, &type, sizeof(struct hv_guid)); 514 memcpy(&child_device_ctx->class_id, type, sizeof(struct hv_guid));
515 memcpy(&child_device_ctx->device_id, &instance, sizeof(struct hv_guid)); 515 memcpy(&child_device_ctx->device_id, instance, sizeof(struct hv_guid));
516 516
517 DPRINT_EXIT(VMBUS_DRV); 517 DPRINT_EXIT(VMBUS_DRV);
518 518
@@ -611,8 +611,6 @@ static void vmbus_child_device_destroy(struct hv_device *device_obj)
611static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env) 611static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
612{ 612{
613 struct device_context *device_ctx = device_to_device_context(device); 613 struct device_context *device_ctx = device_to_device_context(device);
614 int i = 0;
615 int len = 0;
616 int ret; 614 int ret;
617 615
618 DPRINT_ENTER(VMBUS_DRV); 616 DPRINT_ENTER(VMBUS_DRV);
@@ -632,8 +630,6 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
632 device_ctx->class_id.data[14], 630 device_ctx->class_id.data[14],
633 device_ctx->class_id.data[15]); 631 device_ctx->class_id.data[15]);
634 632
635 env->envp_idx = i;
636 env->buflen = len;
637 ret = add_uevent_var(env, "VMBUS_DEVICE_CLASS_GUID={" 633 ret = add_uevent_var(env, "VMBUS_DEVICE_CLASS_GUID={"
638 "%02x%02x%02x%02x-%02x%02x-%02x%02x-" 634 "%02x%02x%02x%02x-%02x%02x-%02x%02x-"
639 "%02x%02x%02x%02x%02x%02x%02x%02x}", 635 "%02x%02x%02x%02x%02x%02x%02x%02x}",
@@ -679,8 +675,6 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
679 if (ret) 675 if (ret)
680 return ret; 676 return ret;
681 677
682 env->envp[env->envp_idx] = NULL;
683
684 DPRINT_EXIT(VMBUS_DRV); 678 DPRINT_EXIT(VMBUS_DRV);
685 679
686 return 0; 680 return 0;