|
@@ -216,9 +216,16 @@ static void vmbus_process_rescind_offer(struct work_struct *work)
|
|
|
unsigned long flags;
|
|
|
struct vmbus_channel *primary_channel;
|
|
|
struct vmbus_channel_relid_released msg;
|
|
|
+ struct device *dev;
|
|
|
+
|
|
|
+ if (channel->device_obj) {
|
|
|
+ dev = get_device(&channel->device_obj->device);
|
|
|
+ if (dev) {
|
|
|
+ vmbus_device_unregister(channel->device_obj);
|
|
|
+ put_device(dev);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- if (channel->device_obj)
|
|
|
- vmbus_device_unregister(channel->device_obj);
|
|
|
memset(&msg, 0, sizeof(struct vmbus_channel_relid_released));
|
|
|
msg.child_relid = channel->offermsg.child_relid;
|
|
|
msg.header.msgtype = CHANNELMSG_RELID_RELEASED;
|