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

Commit 9348f8c1 authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat Committed by Michael Bestas
Browse files

hal : Fix data initialization and input validation errors

 Initialize uninitialized variables and add null check to
 avoid following errors

 119251, 119255, 119256, 119257, 119258
 144012, 913366, 119249, 119250, 58938

Change-Id: I09d35977c9c3abf5819d5c72506c8d157158e212
parent e58a2b52
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -198,6 +198,7 @@ static int spkr_calibrate(int t0)
    int32_t pcm_dev_rx_id = -1, pcm_dev_tx_id = -1;
    struct timespec ts;

    status.status = 0;
    if (!adev) {
        ALOGE("%s: Invalid params", __func__);
        return -EINVAL;
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 * Not a Contribution.
 *
 * Copyright (C) 2013 The Android Open Source Project
@@ -253,7 +253,7 @@ exit:
__attribute__ ((visibility ("default")))
int offload_effects_bundle_hal_stop_output(audio_io_handle_t output, int pcm_id)
{
    int ret;
    int ret = -1;
    struct listnode *node;
    struct listnode *fx_node;
    output_context_t *out_ctxt;