audio: return EINVAL to avoid get_presentation_position spamming logs
authorVictor Lourme <l0w@protonmail.ch>
Mon, 26 Mar 2018 17:36:07 +0000 (19:36 +0200)
committerChristopher N. Hesse <raymanfx@gmail.com>
Thu, 5 Apr 2018 14:29:13 +0000 (14:29 +0000)
Change-Id: I32ec0c5651395c7af3dc4b80d25204bf0fcc1977
(cherry picked from commit 5869cd357e9b0bd9dffe70ac207cda4ec266b73c)

audio/audio_hw.c

index 8daeb6a54105ce526e759adba90f5f19c56a5edf..5ae48b79b0cea781a88c5db76335b02bc27f4846 100644 (file)
@@ -3298,7 +3298,7 @@ static int out_get_presentation_position(const struct audio_stream_out *stream,
                                    uint64_t *frames, struct timespec *timestamp)
 {
     struct stream_out *out = (struct stream_out *)stream;
-    int ret = -1;
+    int ret = -EINVAL;
 
     lock_output_stream(out);
 
@@ -3337,7 +3337,6 @@ static int out_get_presentation_position(const struct audio_stream_out *stream,
                             ret = 0;
                             goto done;
                         }
-                        ret = -1;
                     }
                 }
             }