drivers: soc: qcom: rimps_memlat: update error checks
set_event will return NULL if event_id is not valid, the
caller is proceeding further without proper check for NULL.
Update pmu event setup function to check pevent for NULL.
From the RIMPS perspective, pmu counter IDs 0 and 1 correspond
to 64bit cycle counter with ID 0 representing low 32 bit and
ID 1 representing high 32bit, while the counter IDs from 2 to 7
correspond to remaining PMUs. At the time of storing pmu counter
values to RIMPS shared memory, the function store_event_val()
stores both low and high 32bit values of cycle counter when ID 0 is
passed as argument to pmu index, hence no need to handle ID 1
separately. Update logic accordingly to drop check for ID 1.
Change-Id: Idd345c825572710753f18306f565043347921216
Signed-off-by:
Santosh Mardi <gsantosh@codeaurora.org>
Loading
Please register or sign in to comment