diff options
Diffstat (limited to 'drivers/media/pci/cx25821/cx25821-video-upstream.c')
-rw-r--r-- | drivers/media/pci/cx25821/cx25821-video-upstream.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/pci/cx25821/cx25821-video-upstream.c b/drivers/media/pci/cx25821/cx25821-video-upstream.c index 1f43be0b04c8..a664997e1958 100644 --- a/drivers/media/pci/cx25821/cx25821-video-upstream.c +++ b/drivers/media/pci/cx25821/cx25821-video-upstream.c | |||
@@ -330,8 +330,9 @@ int cx25821_write_frame(struct cx25821_channel *chan, | |||
330 | 330 | ||
331 | if (frame_size - curpos < count) | 331 | if (frame_size - curpos < count) |
332 | count = frame_size - curpos; | 332 | count = frame_size - curpos; |
333 | memcpy((char *)out->_data_buf_virt_addr + frame_offset + curpos, | 333 | if (copy_from_user((__force char *)out->_data_buf_virt_addr + frame_offset + curpos, |
334 | data, count); | 334 | data, count)) |
335 | return -EFAULT; | ||
335 | curpos += count; | 336 | curpos += count; |
336 | if (curpos == frame_size) { | 337 | if (curpos == frame_size) { |
337 | out->_frame_count++; | 338 | out->_frame_count++; |