Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7586e297 authored by Naresh Tanniru's avatar Naresh Tanniru Committed by Satya Krishna Pindiproli
Browse files

hal : Add proper check to fix NULL check error.

 -Add proper check to avoid dereferencing of
  pointer after null check.

Conflicts:
	hal/audio_extn/utils.c

Change-Id: I61e774b46dcca64e40fc0f5453abb673d8d0c09f
parent b4288b8e
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -1632,7 +1632,7 @@ int audio_extn_utils_get_avt_device_drift(
                ret = -EINVAL;
        }
    } else {
        ALOGE("%s: Invalid usecase %d ",__func__, usecase->type);
        ALOGE("%s: Invalid usecase",__func__);
        ret = -EINVAL;
    }

@@ -1768,12 +1768,7 @@ int audio_extn_utils_compress_set_clk_rec_mode(
    struct stream_out *out = NULL;
    int ret = -EINVAL;

    if (usecase == NULL) {
        ALOGE("%s:: Invalid use case", __func__);
        goto exit;
    }

    if (usecase->type != PCM_PLAYBACK) {
    if (usecase == NULL || usecase->type != PCM_PLAYBACK) {
        ALOGE("%s:: Invalid use case", __func__);
        goto exit;
    }