summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2016-08-19 11:12:53 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-21 16:53:57 +0200
commitcf05918370006fbdb6dc5708ca9951ee8093b8ef (patch)
tree85f169193094bbb4a02216840f7928175d8b88ed
parent4246501e23be88383fed31ba0df6f0af7b91e176 (diff)
staging: most: hdm-usb: simplify initialization of mbo->status.
This patch simplifies the code that initializes mbo->status. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/most/hdm-usb/hdm_usb.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index ddee28176c3b..7f00aafa9f21 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -596,15 +596,11 @@ static void hdm_read_completion(struct urb *urb)
}
} else {
mbo->processed_length = urb->actual_length;
- if (!mdev->padding_active[channel]) {
- mbo->status = MBO_SUCCESS;
- } else {
- if (hdm_remove_padding(mdev, channel, mbo)) {
- mbo->processed_length = 0;
- mbo->status = MBO_E_INVAL;
- } else {
- mbo->status = MBO_SUCCESS;
- }
+ mbo->status = MBO_SUCCESS;
+ if (mdev->padding_active[channel] &&
+ hdm_remove_padding(mdev, channel, mbo)) {
+ mbo->processed_length = 0;
+ mbo->status = MBO_E_INVAL;
}
}
spin_lock_irqsave(&mdev->anchor_list_lock[channel], flags);