mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
coresight: Add Null check before accessing pointer buf
Add NULL check to avoid potential NULL pointer dereference for "buf" pointer. Change-Id: I80b29fdacfd8a95a895a32f30b99eb00b3fc2f55 Signed-off-by: Saurabh Ambulkar <sambulka@codeaurora.org>
This commit is contained in:
parent
c688b1eac0
commit
be06049ea6
1 changed files with 3 additions and 0 deletions
|
|
@ -237,6 +237,9 @@ static int tmc_enable_etf_sink_perf(struct coresight_device *csdev, void *data)
|
|||
struct perf_output_handle *handle = data;
|
||||
struct cs_buffers *buf = etm_perf_sink_config(handle);
|
||||
|
||||
if (!buf)
|
||||
return -EINVAL;
|
||||
|
||||
spin_lock_irqsave(&drvdata->spinlock, flags);
|
||||
do {
|
||||
ret = -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue