summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/tm6000/tm6000-video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index 92edb4185868..edc59424d260 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -397,6 +397,8 @@ HEADER:
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;
// }
}