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

Commit ca20fe53 authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat Committed by Gerrit - the friendly Code Review server
Browse files

hal: Fix input validation error

 -dereference object post null check to fix below error
  6700584

Change-Id: I240b0fbbcfee10136e07679c66000ff289d51938
parent b8260a86
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4343,8 +4343,8 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev,
            struct audio_usecase *uc;
            uc = node_to_item(node, struct audio_usecase, list);
            struct stream_out *out = (struct stream_out*) uc->stream.out;
            unsigned int out_channels = audio_channel_count_from_out_mask(out->channel_mask);
            if (uc->type == PCM_PLAYBACK && out && usecase != uc) {
                unsigned int out_channels = audio_channel_count_from_out_mask(out->channel_mask);

                ALOGD("%s:napb: (%d) - (%s)id (%d) sr %d bw "
                      "(%d) ch (%d) device %s", __func__, i++, use_case_table[uc->id],
+1 −1
Original line number Diff line number Diff line
@@ -4310,8 +4310,8 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev,
            struct audio_usecase *uc;
            uc = node_to_item(node, struct audio_usecase, list);
            struct stream_out *out = (struct stream_out*) uc->stream.out;
            unsigned int out_channels = audio_channel_count_from_out_mask(out->channel_mask);
            if (uc->type == PCM_PLAYBACK && out && usecase != uc) {
                unsigned int out_channels = audio_channel_count_from_out_mask(out->channel_mask);

                ALOGD("%s:napb: (%d) - (%s)id (%d) sr %d bw "
                      "(%d) ch (%d) device %s", __func__, i++, use_case_table[uc->id],