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

Commit e0619c83 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: synx: acquire mutex through loop index"

parents 2190df27 709d212a
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-License-Identifier: GPL-2.0-only
/*
/*
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 */
 */
#define pr_fmt(fmt) "synx: " fmt
#define pr_fmt(fmt) "synx: " fmt


@@ -1327,7 +1327,7 @@ static void synx_object_cleanup(struct synx_client *client)
		struct synx_table_row *row =
		struct synx_table_row *row =
			synx_dev->synx_table + i;
			synx_dev->synx_table + i;


		mutex_lock(&synx_dev->row_locks[row->index]);
		mutex_lock(&synx_dev->row_locks[i]);
		if (row->index) {
		if (row->index) {
			list_for_each_entry_safe(payload_info,
			list_for_each_entry_safe(payload_info,
				temp_payload_info,
				temp_payload_info,
@@ -1339,7 +1339,7 @@ static void synx_object_cleanup(struct synx_client *client)
				}
				}
			}
			}
		}
		}
		mutex_unlock(&synx_dev->row_locks[row->index]);
		mutex_unlock(&synx_dev->row_locks[i]);
	}
	}
}
}