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

Commit b5296b93 authored by Amy Maloche's avatar Amy Maloche Committed by Sudhakar Manapati
Browse files

input: synaptics_i2c_rmi4: allocate memory for interrupt status



In synaptics_rmi4_i2c_read, intr_status is a char variant.  So
if num_of_intr_regs > 1, then intr_status will write 2 bytes.  This
will destroy the stack, so avoid it.

This patch is propagated from msm-3.4 kernel.
(commit: 5c7b5d59fe7d856e5cb20c7ff6e5dc3cc73fa892
input: synaptics_i2c_rmi4: allocate memory for interrupt status)
Also cleared the below checkpatch warning on msm-3.18 kernel
WARNING: Possible unnecessary 'out of memory' message
+               if (!intr_status) {
+                       dev_err(&rmi4_data->i2c_client->dev,

Change-Id: I5c16e491a84d3f8dd96a11810c060944a457b99a
Signed-off-by: default avatarAmy Maloche <amaloche@codeaurora.org>
Signed-off-by: default avatarSudhakar Manapati <smanap@codeaurora.org>
parent 63077eda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment