summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/stv680.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-06 23:42:19 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-06 23:42:19 -0300
commit5700f50011f5c8ad20cfc1377cc830ed4eee9d06 (patch)
tree2c82f7573c54bdce520b1a4748deb0fe4126d2a6 /linux/drivers/media/video/stv680.c
parent4b70cc85ac708fdb3107b4d17851e70e6bf9ecc6 (diff)
parent00c1eda676d0707af2602f156278772fe3c30cb8 (diff)
downloadmediapointer-dvb-s2-5700f50011f5c8ad20cfc1377cc830ed4eee9d06.tar.gz
mediapointer-dvb-s2-5700f50011f5c8ad20cfc1377cc830ed4eee9d06.tar.bz2
merge: http://linuxtv.org/hg/~hgoede/gspca/
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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/linux/drivers/media/video/stv680.c b/linux/drivers/media/video/stv680.c
index eafe68502..600c19a78 100644
--- a/linux/drivers/media/video/stv680.c
+++ b/linux/drivers/media/video/stv680.c
@@ -739,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]);
@@ -750,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;
}