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

Commit 42e2ff84 authored by Andrei Danaila's avatar Andrei Danaila Committed by Matt Wagantall
Browse files

mhi: core: Fix double increment on event counter



Prevent event counter from getting incremented twice and breaking
the modulo operation.

Change-Id: I472115a3d65a84904482455d00cee9de6d31043b
Signed-off-by: default avatarAndrei Danaila <adanaila@codeaurora.org>
parent da40a5a2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1092,7 +1092,6 @@ enum MHI_STATUS recycle_trb_and_ring(struct mhi_device_ctxt *mhi_dev_ctxt,
						mhi_dev_ctxt->event_db_addr,
						ring_index, db_value);
			}
			mhi_dev_ctxt->ev_counter[ring_index]++;
			spin_unlock_irqrestore(lock, flags);
			break;
		}