Web lists-archives.org

Copy and paste error in em28xx_init_isoc




Hi,

attached patch fixes a copy and paste error in check of kzalloc return 
value. The check block was copied from the previous allocation but the 
variable wasn't exchanged.

Signed-of-by: "Janne Grunau <janne-dvb@xxxxxxxxx>

Janne
diff -r 64a50d51c60b linux/drivers/media/video/em28xx/em28xx-core.c
--- a/linux/drivers/media/video/em28xx/em28xx-core.c	Wed Apr 23 13:57:47 2008 +0200
+++ b/linux/drivers/media/video/em28xx/em28xx-core.c	Thu Apr 24 20:40:23 2008 +0200
@@ -659,9 +659,9 @@ int em28xx_init_isoc(struct em28xx *dev,
 
 	dev->isoc_ctl.transfer_buffer = kzalloc(sizeof(void *)*num_bufs,
 					      GFP_KERNEL);
-	if (!dev->isoc_ctl.urb) {
+	if (!dev->isoc_ctl.transfer_buffer) {
 		em28xx_errdev("cannot allocate memory for usbtransfer\n");
-		kfree(dev->isoc_ctl.urb);
+		kfree(dev->isoc_ctl.transfer_buffer);
 		return -ENOMEM;
 	}
 
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list