disp: msm: sde: Fix null dereference errors

Add changes to avoid NULL dereference access and
uninitalized access in sde driver.

Change-Id: Ic9c06f54d1ccd820973fc0ba4aa75d2848f2ce03
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
This commit is contained in:
Jayaprakash 2020-04-06 19:08:57 +05:30 committed by santosh
parent 3bfb8cafce
commit 11aab5f9c3
2 changed files with 4 additions and 1 deletions

View File

@ -818,6 +818,9 @@ static void _sde_core_perf_crtc_update_check(struct drm_crtc *crtc,
struct sde_core_perf_params *new = &sde_crtc->new_perf;
int i;
if (!kms)
return;
for (i = 0; i < SDE_POWER_HANDLE_DBUS_ID_MAX; i++) {
/*
* cases for bus bandwidth update.

View File

@ -2346,7 +2346,7 @@ int sde_rm_reserve(
* comes again after earlier commit gets processed.
*/
if (test_only && rsvp_nxt) {
if (test_only && rsvp_cur && rsvp_nxt) {
SDE_ERROR("cur %d nxt %d enc %d conn %d\n", rsvp_cur->seq,
rsvp_nxt->seq, enc->base.id,
conn_state->connector->base.id);