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

Commit bc823bad authored by Sachin Mohan Gadag's avatar Sachin Mohan Gadag Committed by Gerrit - the friendly Code Review server
Browse files

hal: Fix a pointer deference issue

- For HFP client usecase active input is not
  updated with current input stream which results
  in issue. To avoid check for active_input value
  before deferencing.
  
Change-Id: I080bf4bf6f069ef6f7a182f5a1542066503ca09c
parent 99c1fc0d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8400,7 +8400,7 @@ static bool platform_check_capture_codec_backend_cfg(struct audio_device* adev,
    } else if (my_data->is_internal_codec && !audio_is_usb_in_device(snd_device)) {
        sample_rate =  CODEC_BACKEND_DEFAULT_SAMPLE_RATE;
        channels = CODEC_BACKEND_DEFAULT_TX_CHANNELS;
        if (adev->active_input->bit_width == 24)
        if (adev->active_input && adev->active_input->bit_width == 24)
            bit_width = platform_get_snd_device_bit_width(snd_device);
    } else {
        struct listnode *node;