mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
disp: msm: sde: add checks to avoid null pointer dereference
This change adds required checks to avoid accessing null pointer where debug bus is not initialised and dumping the debug bus points. Change-Id: Ia46a4b95706f05e37be660f006c04b1e2e9f6848 Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
This commit is contained in:
parent
862239a2f3
commit
92359a8a2e
1 changed files with 3 additions and 0 deletions
|
|
@ -959,6 +959,9 @@ static void _sde_dbg_dump_sde_dbg_bus(struct sde_dbg_sde_debug_bus *bus)
|
|||
u32 bus_size;
|
||||
char name[20];
|
||||
|
||||
if (!bus || !bus->cmn.entries_size)
|
||||
return;
|
||||
|
||||
reg_base = _sde_dump_get_blk_addr(bus->cmn.name);
|
||||
if (!reg_base || !reg_base->base) {
|
||||
pr_err("unable to find mem_base for %s\n", bus->cmn.name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue