aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/hv/hv_mouse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 6fa462109ce9..50147f84741c 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -684,6 +684,7 @@ static int MousevscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
684 684
685 if (ret != 0) { 685 if (ret != 0) {
686 pr_err("unable to open channel: %d", ret); 686 pr_err("unable to open channel: %d", ret);
687 FreeInputDevice(inputDevice);
687 return -1; 688 return -1;
688 } 689 }
689 690
@@ -695,6 +696,7 @@ static int MousevscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
695 pr_err("unable to connect channel: %d", ret); 696 pr_err("unable to connect channel: %d", ret);
696 697
697 vmbus_close(Device->channel); 698 vmbus_close(Device->channel);
699 FreeInputDevice(inputDevice);
698 return ret; 700 return ret;
699 } 701 }
700 702