diff options
-rw-r--r-- | drivers/hv/channel_mgmt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index bbff5f200bef..fa920469bf10 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c | |||
@@ -203,7 +203,8 @@ static void vmbus_process_rescind_offer(struct work_struct *work) | |||
203 | struct vmbus_channel *primary_channel; | 203 | struct vmbus_channel *primary_channel; |
204 | struct vmbus_channel_relid_released msg; | 204 | struct vmbus_channel_relid_released msg; |
205 | 205 | ||
206 | vmbus_device_unregister(channel->device_obj); | 206 | if (channel->device_obj) |
207 | vmbus_device_unregister(channel->device_obj); | ||
207 | memset(&msg, 0, sizeof(struct vmbus_channel_relid_released)); | 208 | memset(&msg, 0, sizeof(struct vmbus_channel_relid_released)); |
208 | msg.child_relid = channel->offermsg.child_relid; | 209 | msg.child_relid = channel->offermsg.child_relid; |
209 | msg.header.msgtype = CHANNELMSG_RELID_RELEASED; | 210 | msg.header.msgtype = CHANNELMSG_RELID_RELEASED; |
@@ -216,7 +217,7 @@ static void vmbus_process_rescind_offer(struct work_struct *work) | |||
216 | } else { | 217 | } else { |
217 | primary_channel = channel->primary_channel; | 218 | primary_channel = channel->primary_channel; |
218 | spin_lock_irqsave(&primary_channel->sc_lock, flags); | 219 | spin_lock_irqsave(&primary_channel->sc_lock, flags); |
219 | list_del(&channel->listentry); | 220 | list_del(&channel->sc_list); |
220 | spin_unlock_irqrestore(&primary_channel->sc_lock, flags); | 221 | spin_unlock_irqrestore(&primary_channel->sc_lock, flags); |
221 | } | 222 | } |
222 | free_channel(channel); | 223 | free_channel(channel); |