This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new cc44b3b521 audio/comp: fix build warning caused by invalid return value
cc44b3b521 is described below

commit cc44b3b5214d34d6268447915c0308ae7dce6bdc
Author: chao an <[email protected]>
AuthorDate: Mon Jun 2 16:31:16 2025 +0800

    audio/comp: fix build warning caused by invalid return value
    
    audio/audio_comp.c:958:14: warning: returning ‘int’ from a function with 
return
                                        type ‘struct audio_lowerhalf_s *’ makes 
pointer
                                        from integer without a cast 
[-Wint-conversion]
      958 |       return -EINVAL;
          |              ^
    
    Signed-off-by: chao an <[email protected]>
---
 audio/audio_comp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/audio/audio_comp.c b/audio/audio_comp.c
index 9900a87a77..a08a255670 100644
--- a/audio/audio_comp.c
+++ b/audio/audio_comp.c
@@ -955,7 +955,7 @@ FAR struct audio_lowerhalf_s *audio_comp_initialize(FAR 
const char *name,
 
   if (i == 0)
     {
-      return -EINVAL;
+      return NULL;
     }
 
   priv = kmm_zalloc(sizeof(struct audio_comp_priv_s) +

Reply via email to