[PATCH] coreaudio: Notify error in coreaudio_init_out

Akihiko Odaki posted 1 patch 2 years, 2 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220226100248.26847-1-akihiko.odaki@gmail.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Christian Schoenebeck <qemu_oss@crudebyte.com>, Akihiko Odaki <akihiko.odaki@gmail.com>
There is a newer version of this series
audio/coreaudio.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] coreaudio: Notify error in coreaudio_init_out
Posted by Akihiko Odaki 2 years, 2 months ago
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
 audio/coreaudio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/audio/coreaudio.c b/audio/coreaudio.c
index d8a21d3e507..d7cfdcc4fc4 100644
--- a/audio/coreaudio.c
+++ b/audio/coreaudio.c
@@ -604,6 +604,8 @@ static int coreaudio_init_out(HWVoiceOut *hw, struct audsettings *as,
             coreaudio_playback_logerr(status,
                                       "Could not remove voice property change listener\n");
         }
+
+        return -1;
     }
 
     return 0;
-- 
2.32.0 (Apple Git-132)
Re: [PATCH] coreaudio: Notify error in coreaudio_init_out
Posted by Christian Schoenebeck 2 years, 2 months ago
On Samstag, 26. Februar 2022 11:02:48 CET Akihiko Odaki wrote:
> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> ---
>  audio/coreaudio.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/audio/coreaudio.c b/audio/coreaudio.c
> index d8a21d3e507..d7cfdcc4fc4 100644
> --- a/audio/coreaudio.c
> +++ b/audio/coreaudio.c
> @@ -604,6 +604,8 @@ static int coreaudio_init_out(HWVoiceOut *hw, struct
> audsettings *as, coreaudio_playback_logerr(status,
>                                        "Could not remove voice property
> change listener\n"); }
> +
> +        return -1;
>      }
> 
>      return 0;

Is this a pure theoretical fix, or does it actually fix an actually 
encountered misbehaviour? I don't see any explanation in the commit log. I 
mean the branch here is about removing a listener only.

Best regards,
Christian Schoenebeck
Re: [PATCH] coreaudio: Notify error in coreaudio_init_out
Posted by Akihiko Odaki 2 years, 2 months ago
On 2022/02/26 19:16, Christian Schoenebeck wrote:
> On Samstag, 26. Februar 2022 11:02:48 CET Akihiko Odaki wrote:
>> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
>> ---
>>   audio/coreaudio.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/audio/coreaudio.c b/audio/coreaudio.c
>> index d8a21d3e507..d7cfdcc4fc4 100644
>> --- a/audio/coreaudio.c
>> +++ b/audio/coreaudio.c
>> @@ -604,6 +604,8 @@ static int coreaudio_init_out(HWVoiceOut *hw, struct
>> audsettings *as, coreaudio_playback_logerr(status,
>>                                         "Could not remove voice property
>> change listener\n"); }
>> +
>> +        return -1;
>>       }
>>
>>       return 0;
> 
> Is this a pure theoretical fix, or does it actually fix an actually
> encountered misbehaviour? I don't see any explanation in the commit log. I
> mean the branch here is about removing a listener only.
> 
> Best regards,
> Christian Schoenebeck
> 
> 

I saw branching to this block results in abort as core->hw.samples is 
not set.

Regards,
Akihiko Odaki
Re: [PATCH] coreaudio: Notify error in coreaudio_init_out
Posted by Christian Schoenebeck 2 years, 2 months ago
On Samstag, 26. Februar 2022 11:18:44 CET Akihiko Odaki wrote:
> On 2022/02/26 19:16, Christian Schoenebeck wrote:
> > On Samstag, 26. Februar 2022 11:02:48 CET Akihiko Odaki wrote:
> >> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
> >> ---
> >> 
> >>   audio/coreaudio.c | 2 ++
> >>   1 file changed, 2 insertions(+)
> >> 
> >> diff --git a/audio/coreaudio.c b/audio/coreaudio.c
> >> index d8a21d3e507..d7cfdcc4fc4 100644
> >> --- a/audio/coreaudio.c
> >> +++ b/audio/coreaudio.c
> >> @@ -604,6 +604,8 @@ static int coreaudio_init_out(HWVoiceOut *hw, struct
> >> audsettings *as, coreaudio_playback_logerr(status,
> >> 
> >>                                         "Could not remove voice property
> >> 
> >> change listener\n"); }
> >> +
> >> +        return -1;
> >> 
> >>       }
> >>       
> >>       return 0;
> > 
> > Is this a pure theoretical fix, or does it actually fix an actually
> > encountered misbehaviour? I don't see any explanation in the commit log. I
> > mean the branch here is about removing a listener only.
> > 
> > Best regards,
> > Christian Schoenebeck
> 
> I saw branching to this block results in abort as core->hw.samples is
> not set.

Ok, then please add an appropriate description to the commit log of what your 
observed. Except of that:

Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>

Best regards,
Christian Schoenebeck