summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorJordan Nien <jnien@nvidia.com>2015-12-21 02:26:05 -0500
committerDavid Pu <dpu@nvidia.com>2017-07-27 19:09:19 -0400
commit140eb2bd5c227362d8d107083c171f30a3ab2eab (patch)
tree0a0d2c4ac69ac0535697fe1c5e52c5ae4b343b26 /drivers/input/touchscreen
parentdafc94211e4092123431162467e6e29168e0a15e (diff)
input: touch: Raydium: fix possible NULL dereference.
Coverity id : 13379 Bug 1416640 Change-Id: I6d895f1a1854ed0ecde46e541c262cb76972c104 Signed-off-by: Jordan Nien <jnien@nvidia.com> Reviewed-on: http://git-master/r/925392 (cherry picked from commit 09065810ff5a1daf4c8c37cd9c05ee57ed29b6e8) Reviewed-on: http://git-master/r/928464 Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/rm31080a_ts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/rm31080a_ts.c b/drivers/input/touchscreen/rm31080a_ts.c
index b86e479b1..06668f0d1 100644
--- a/drivers/input/touchscreen/rm31080a_ts.c
+++ b/drivers/input/touchscreen/rm31080a_ts.c
@@ -427,9 +427,9 @@ static int rm_tch_spi_burst_write(u8 reg, u8 *txbuf, size_t len)
427 u8 *p_u8_Tmp; 427 u8 *p_u8_Tmp;
428 /*to do: check result*/ 428 /*to do: check result*/
429 p_u8_Tmp = kmalloc(len + 1, GFP_KERNEL); 429 p_u8_Tmp = kmalloc(len + 1, GFP_KERNEL);
430 p_u8_Tmp[0] = reg;
431 if (p_u8_Tmp == NULL) 430 if (p_u8_Tmp == NULL)
432 return -ENOMEM; 431 return -ENOMEM;
432 p_u8_Tmp[0] = reg;
433 for (i = 0; i < len; i++) 433 for (i = 0; i < len; i++)
434 p_u8_Tmp[i + 1] = txbuf[i]; 434 p_u8_Tmp[i + 1] = txbuf[i];
435 rm_tch_spi_write(p_u8_Tmp, len + 1); 435 rm_tch_spi_write(p_u8_Tmp, len + 1);