Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf059183 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

staging: most: hdm-usb: simplify initialization of mbo->status.



This patch simplifies the code that initializes mbo->status.

Signed-off-by: default avatarAndrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4246501e
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -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)) {
		if (mdev->padding_active[channel] &&
		    hdm_remove_padding(mdev, channel, mbo)) {
			mbo->processed_length = 0;
			mbo->status = MBO_E_INVAL;
			} else {
				mbo->status = MBO_SUCCESS;
			}
		}
	}
	spin_lock_irqsave(&mdev->anchor_list_lock[channel], flags);