diff mbox

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

Message ID 4BDDB5C3.6020306@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

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

Patch

Index: work.x86-64/drivers/staging/tm6000/tm6000-video.c
===================================================================
--- work.x86-64.orig/drivers/staging/tm6000/tm6000-video.c
+++ work.x86-64/drivers/staging/tm6000/tm6000-video.c
@@ -395,6 +395,8 @@  HEADER:
 					jiffies);
 			return rc;
 		}
+		if (!*buf)
+			return 0;
 	}
 
 	return 0;
@@ -528,7 +530,7 @@  static inline int tm6000_isoc_copy(struc
 				}
 			}
 			copied += len;
-			if (copied>=size)
+			if (copied >= size || !buf)
 				break;
 //		}
 	}