diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-12-29 05:02:43 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-01 04:41:14 -0500 |
commit | b68554cd76bfed57a3aac2fc4ac4c60478d90050 (patch) | |
tree | b485b6eedfd437dec105a4f9822f79fc5ed1d0e3 | |
parent | 80c1bce9aa315ac70738f79afb4f7c93ae27d9fa (diff) |
[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>
-rw-r--r-- | drivers/media/usb/hdpvr/hdpvr-video.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c index 7dee22deebf3..ba7f02270c83 100644 --- a/drivers/media/usb/hdpvr/hdpvr-video.c +++ b/drivers/media/usb/hdpvr/hdpvr-video.c | |||
@@ -462,10 +462,8 @@ static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count, | |||
462 | } | 462 | } |
463 | 463 | ||
464 | if (wait_event_interruptible(dev->wait_data, | 464 | if (wait_event_interruptible(dev->wait_data, |
465 | buf->status == BUFSTAT_READY)) { | 465 | buf->status == BUFSTAT_READY)) |
466 | ret = -ERESTARTSYS; | 466 | return -ERESTARTSYS; |
467 | goto err; | ||
468 | } | ||
469 | } | 467 | } |
470 | 468 | ||
471 | if (buf->status != BUFSTAT_READY) | 469 | if (buf->status != BUFSTAT_READY) |