diff mbox

tm6000: Prevent Kernel Oops changing channel when stream is still on.

Message ID 4BDD8F65.80602@redhat.com (mailing list archive)
State Superseded
Headers show

Commit Message

Mauro Carvalho Chehab May 2, 2010, 2:42 p.m. UTC
None
diff mbox

Patch

diff --git a/linux/drivers/staging/tm6000/tm6000-video.c b/linux/drivers/staging/tm6000/tm6000-video.c
--- a/linux/drivers/staging/tm6000/tm6000-video.c
+++ b/linux/drivers/staging/tm6000/tm6000-video.c
@@ -539,7 +539,7 @@  static inline int tm6000_isoc_copy(struc
 				}
 			}
 			copied += len;
-			if (copied>=size)
+			if (copied >= size || !buf)
 				break;
 //		}
 	}