diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 92edb4185868f3364714ebef80dc8dc8c9925596..edc59424d2604eba4a40d2c185940660cc2df6f5 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -397,6 +397,8 @@ static int copy_streams(u8 *data, u8 *out_p, unsigned long len, jiffies); return rc; } + if (!*buf) + return 0; } return 0; @@ -530,7 +532,7 @@ static inline int tm6000_isoc_copy(struct urb *urb) } } copied += len; - if (copied>=size) + if (copied >= size || !buf) break; // } }