summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/stv680.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-08-11 13:58:54 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-08-11 13:58:54 -0300
commitce486a4e35fc5f89c56f1bc8db8ad09cb9e3a98e (patch)
treebf90690073c0667a01166bbefd5dc1ae0398fe44 /linux/drivers/media/video/stv680.c
parentdb44a7d2b169cceeafa7a8b5fc5b8fe921d4088d (diff)
parent6971a9d650f6ab06dfedc4464665366c87da4bbc (diff)
downloadmediapointer-dvb-s2-ce486a4e35fc5f89c56f1bc8db8ad09cb9e3a98e.tar.gz
mediapointer-dvb-s2-ce486a4e35fc5f89c56f1bc8db8ad09cb9e3a98e.tar.bz2
merge: http://kernellabs.com/hg/~mkrufky/sms1xxx
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/stv680.c')
-rw-r--r--linux/drivers/media/video/stv680.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/linux/drivers/media/video/stv680.c b/linux/drivers/media/video/stv680.c
index a2d7ec732..600c19a78 100644
--- a/linux/drivers/media/video/stv680.c
+++ b/linux/drivers/media/video/stv680.c
@@ -62,6 +62,7 @@
#include <linux/init.h>
#include <linux/vmalloc.h>
#include <linux/slab.h>
+#include <linux/smp_lock.h>
#include <linux/pagemap.h>
#include <linux/errno.h>
#include <linux/videodev.h>
@@ -738,10 +739,6 @@ static int stv680_start_stream (struct usb_stv *stv680)
return 0;
nomem_err:
- for (i = 0; i < STV680_NUMSCRATCH; i++) {
- kfree(stv680->scratch[i].data);
- stv680->scratch[i].data = NULL;
- }
for (i = 0; i < STV680_NUMSBUF; i++) {
usb_kill_urb(stv680->urb[i]);
usb_free_urb(stv680->urb[i]);
@@ -749,6 +746,11 @@ static int stv680_start_stream (struct usb_stv *stv680)
kfree(stv680->sbuf[i].data);
stv680->sbuf[i].data = NULL;
}
+ /* used in irq, free only as all URBs are dead */
+ for (i = 0; i < STV680_NUMSCRATCH; i++) {
+ kfree(stv680->scratch[i].data);
+ stv680->scratch[i].data = NULL;
+ }
return -ENOMEM;
}