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

Commit 43220f8e authored by c_sgarna's avatar c_sgarna
Browse files

input: synaptics_i2c_rmi4: Reinitialize list after freeing it



During firmware update and device reset through sysfs, query info
needs to be updated in support_fn_list. However, both these procedures
free the existing list before updation without setting its list head
to consistent state. Reinitialize the list head of support_fn_list
to avoid memory fault during updation.

CRs-Fixed: 589295
Change-Id: I560e2df53d258e273ff9890c7c62b90a58a423f7
Signed-off-by: default avatarc_sgarna <c_sgarna@codeaurora.org>
parent 0f8fb3e5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2408,6 +2408,8 @@ static int synaptics_rmi4_reset_device(struct synaptics_rmi4_data *rmi4_data)
		}
	}

	INIT_LIST_HEAD(&rmi->support_fn_list);

	retval = synaptics_rmi4_query_device(rmi4_data);
	if (retval < 0) {
		dev_err(&rmi4_data->i2c_client->dev,