[PATCH] staging/vme_user: add missing calls to vme_master_free calls in .remove

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Martyn Welch
Date: Friday, December 3, 2010 - 7:20 am

From: Emilio G. Cota <cota@braap.org>

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
---

 drivers/staging/vme/devices/vme_user.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index db445ed..a571173 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -852,8 +852,10 @@ static int __devexit vme_user_remove(struct device *dev, int cur_bus,
 		device_destroy(vme_user_sysfs_class, MKDEV(VME_MAJOR, i));
 	class_destroy(vme_user_sysfs_class);
 
-	for (i = MASTER_MINOR; i < (MASTER_MAX + 1); i++)
+	for (i = MASTER_MINOR; i < (MASTER_MAX + 1); i++) {
 		kfree(image[i].kern_buf);
+		vme_master_free(image[i].resource);
+	}
 
 	for (i = SLAVE_MINOR; i < (SLAVE_MAX + 1); i++) {
 		vme_slave_set(image[i].resource, 0, 0, 0, 0, VME_A32, 0);


--
Martyn Welch (Principal Software Engineer)   |   Registered in England and
GE Intelligent Platforms                     |   Wales (3828642) at 100
T +44(0)127322748                            |   Barbirolli Square, Manchester,
E martyn.welch@ge.com                        |   M2 3AB  VAT:GB 927559189
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 03/30] staging/vme_user: remove unreachable line, Emilio G. Cota, (Mon Oct 25, 6:10 pm)
[PATCH 08/30] staging/vme/tsi148: fix warning in free_irq, Emilio G. Cota, (Mon Oct 25, 6:10 pm)
[PATCH 10/30] staging/vme/tsi148: remove unreachable line, Emilio G. Cota, (Mon Oct 25, 6:10 pm)
[PATCH 27/30] staging/vme: rework the bus model, Emilio G. Cota, (Mon Oct 25, 6:11 pm)
[PATCH 28/30] staging/vme: convert vme_* users to vme_*_ng, Emilio G. Cota, (Mon Oct 25, 6:11 pm)
[PATCH 30/30] staging/vme: remove _ng suffixes, Emilio G. Cota, (Mon Oct 25, 6:11 pm)
Re: [PATCH 27/30] staging/vme: rework the bus model, Emilio G. Cota, (Wed Nov 3, 9:16 pm)
[PATCH 00/17] Series short description, Martyn Welch, (Fri Nov 12, 4:13 am)
[PATCH 03/17] staging/vme_user: remove unreachable line, Martyn Welch, (Fri Nov 12, 4:14 am)
Re: [PATCH 00/17] Series short description, Martyn Welch, (Fri Nov 12, 4:23 am)
Re: [PATCH 00/17] Series short description, Emilio G. Cota, (Fri Nov 12, 8:11 am)
Re: [PATCH 00/17] Series short description, Martyn Welch, (Fri Nov 12, 8:52 am)
Re: [PATCH 00/17] Series short description, Greg KH, (Tue Nov 16, 12:40 pm)
[PATCH] staging/vme_user: add missing calls to vme_master_ ..., Martyn Welch, (Fri Dec 3, 7:20 am)