* [PATCH] staging: vme_user: fix bugs in vme_user_probe
@ 2011-07-17 23:55 Raja Naresh
2011-07-18 20:30 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Raja Naresh @ 2011-07-17 23:55 UTC (permalink / raw)
To: gregkh; +Cc: martyn.welch, tglx, devel, linux-kernel, Raja Naresh
Signed-off-by: Raja Naresh <rajanaresh89@gmail.com>
---
drivers/staging/vme/devices/vme_user.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index a571173..0929c33 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -736,7 +736,7 @@ static int __devinit vme_user_probe(struct device *dev, int cur_bus,
image[i].pci_buf = 0;
vme_slave_free(image[i].resource);
err = -ENOMEM;
- goto err_slave;
+ goto err_slave_alloc;
}
}
@@ -803,13 +803,10 @@ static int __devinit vme_user_probe(struct device *dev, int cur_bus,
return 0;
- /* Ensure counter set correcty to destroy all sysfs devices */
- i = VME_DEVS;
err_sysfs:
- while (i > 0) {
- i--;
+ while (--i >= 0)
device_destroy(vme_user_sysfs_class, MKDEV(VME_MAJOR, i));
- }
+
class_destroy(vme_user_sysfs_class);
/* Ensure counter set correcty to unalloc all master windows */
@@ -818,18 +815,17 @@ err_master_buf:
for (i = MASTER_MINOR; i < (MASTER_MAX + 1); i++)
kfree(image[i].kern_buf);
err_master:
- while (i > MASTER_MINOR) {
- i--;
+ while (--i >= MASTER_MINOR)
vme_master_free(image[i].resource);
- }
-
- /*
+ /*
* Ensure counter set correcty to unalloc all slave windows and buffers
*/
i = SLAVE_MAX + 1;
+err_slave_alloc:
+ if (i != (SLAVE_MAX + 1))
+ vme_slave_free(image[i].resource);
err_slave:
- while (i > SLAVE_MINOR) {
- i--;
+ while (--i >= SLAVE_MINOR) {
buf_unalloc(i);
vme_slave_free(image[i].resource);
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: vme_user: fix bugs in vme_user_probe
2011-07-17 23:55 [PATCH] staging: vme_user: fix bugs in vme_user_probe Raja Naresh
@ 2011-07-18 20:30 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2011-07-18 20:30 UTC (permalink / raw)
To: Raja Naresh; +Cc: gregkh, martyn.welch, tglx, devel, linux-kernel
On Sun, Jul 17, 2011 at 07:55:58PM -0400, Raja Naresh wrote:
> Signed-off-by: Raja Naresh <rajanaresh89@gmail.com>
What specific bugs are these?
You need to be a lot more descriptive as to what is happening in your
patch in order for it to be able to be applied.
Care to redo it and resend it?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-19 1:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-17 23:55 [PATCH] staging: vme_user: fix bugs in vme_user_probe Raja Naresh
2011-07-18 20:30 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox