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:
Amy Maloche <amaloche@codeaurora.org>
Signed-off-by:
Sudhakar Manapati <smanap@codeaurora.org>
Loading
Please register or sign in to comment