Commit 607cfab6 authored by Andreas Mohr's avatar Andreas Mohr Committed by Mauro Carvalho Chehab

V4L/DVB (13003): Correct dangerous and inefficient msecs_to_jiffies()...

V4L/DVB (13003): Correct dangerous and inefficient msecs_to_jiffies() calculation in some V4L2 drivers
Signed-off-by: default avatarAndreas Mohr <andi@lisas.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6c119ff4
......@@ -1379,8 +1379,10 @@ et61x251_read(struct file* filp, char __user * buf,
(!list_empty(&cam->outqueue)) ||
(cam->state & DEV_DISCONNECTED) ||
(cam->state & DEV_MISCONFIGURED),
cam->module_param.frame_timeout *
1000 * msecs_to_jiffies(1) );
msecs_to_jiffies(
cam->module_param.frame_timeout * 1000
)
);
if (timeout < 0) {
mutex_unlock(&cam->fileop_mutex);
return timeout;
......
......@@ -1954,8 +1954,10 @@ sn9c102_read(struct file* filp, char __user * buf, size_t count, loff_t* f_pos)
(!list_empty(&cam->outqueue)) ||
(cam->state & DEV_DISCONNECTED) ||
(cam->state & DEV_MISCONFIGURED),
cam->module_param.frame_timeout *
1000 * msecs_to_jiffies(1) );
msecs_to_jiffies(
cam->module_param.frame_timeout * 1000
)
);
if (timeout < 0) {
mutex_unlock(&cam->fileop_mutex);
return timeout;
......
......@@ -819,8 +819,10 @@ zc0301_read(struct file* filp, char __user * buf, size_t count, loff_t* f_pos)
(!list_empty(&cam->outqueue)) ||
(cam->state & DEV_DISCONNECTED) ||
(cam->state & DEV_MISCONFIGURED),
cam->module_param.frame_timeout *
1000 * msecs_to_jiffies(1) );
msecs_to_jiffies(
cam->module_param.frame_timeout * 1000
)
);
if (timeout < 0) {
mutex_unlock(&cam->fileop_mutex);
return timeout;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment