2010-12-03 14:20:57

by Martyn Welch

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

From: Emilio G. Cota <[email protected]>

Signed-off-by: Emilio G. Cota <[email protected]>
Acked-by: Martyn Welch <[email protected]>
---

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 [email protected] | M2 3AB VAT:GB 927559189


2010-12-03 14:43:35

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] staging/vme_user: add missing calls to vme_master_free calls in .remove

On Fri, Dec 03, 2010 at 02:20:51PM +0000, Martyn Welch wrote:
> From: Emilio G. Cota <[email protected]>
>
> Signed-off-by: Emilio G. Cota <[email protected]>
> Acked-by: Martyn Welch <[email protected]>
> ---

Does this need to be in .37 or can it wait for .38?

thanks,

greg k-h

2010-12-03 15:29:07

by Martyn Welch

[permalink] [raw]
Subject: Re: [PATCH] staging/vme_user: add missing calls to vme_master_free calls in .remove

On 03/12/10 14:44, Greg KH wrote:
> On Fri, Dec 03, 2010 at 02:20:51PM +0000, Martyn Welch wrote:
>> From: Emilio G. Cota <[email protected]>
>>
>> Signed-off-by: Emilio G. Cota <[email protected]>
>> Acked-by: Martyn Welch <[email protected]>
>> ---
>
> Does this need to be in .37 or can it wait for .38?
>

Given that this is in the vme_user device in the staging tree, I think
it can safely wait until .38.

Martyn

> thanks,
>
> greg k-h


--
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms | Wales (3828642) at 100
T +44(0)127322748 | Barbirolli Square,
Manchester,
E [email protected] | M2 3AB VAT:GB 927559189