[media] hdpvr: Refactoring for hdpvr_read()
Let us return directly if the element "status" of the variable "buf" indicates "BUFSTAT_READY". A check repetition can be excluded for the variable "ret" at the end then. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
80c1bce9aa
commit
b68554cd76
|
@ -462,10 +462,8 @@ static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count,
|
|||
}
|
||||
|
||||
if (wait_event_interruptible(dev->wait_data,
|
||||
buf->status == BUFSTAT_READY)) {
|
||||
ret = -ERESTARTSYS;
|
||||
goto err;
|
||||
}
|
||||
buf->status == BUFSTAT_READY))
|
||||
return -ERESTARTSYS;
|
||||
}
|
||||
|
||||
if (buf->status != BUFSTAT_READY)
|
||||
|
|
Loading…
Reference in New Issue