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

Commit 65e2143b authored by Odelu Kukatla's avatar Odelu Kukatla
Browse files

msm: msm_bus: Set current index to default value



When a client unregisters with bus driver after registering with it,
without a bandwidth update request in-between, the current index is
not having valid value, so update it to default value of 0.

Change-Id: I03d691fd4bbfc557e580233cc9075c027a8ef177
Signed-off-by: default avatarOdelu Kukatla <okukatla@codeaurora.org>
parent eb9d158f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
 *
 * This program is Mree software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -871,7 +871,7 @@ static void unregister_client_adhoc(uint32_t cl)
	}

	curr = client->curr;
	if (curr >= pdata->num_usecases) {
	if ((curr < 0) || (curr >= pdata->num_usecases)) {
		MSM_BUS_ERR("Invalid index Defaulting curr to 0");
		curr = 0;
	}