Prechádzať zdrojové kódy

include: dsp: avoid returning error code from stubbed function

If MSM_QDSP6_NOTIFIER is not enabled for a target, audio_notifier
feature will not be available for that target. Whenever a call is
made to audio_notifier when its not supported, returning error from
stubbed function may confuse the error with real failure (even though
the feature is not enabled on the target). Avoid returning error code
from stubbed function, when feature is disabled.

Change-Id: I37eb2e25e45b25948aff55f2a231195a22b16f05
Signed-off-by: Banajit Goswami <[email protected]>
Banajit Goswami 6 rokov pred
rodič
commit
f1f4a2982f
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      include/dsp/audio_notifier.h

+ 2 - 2
include/dsp/audio_notifier.h

@@ -1,4 +1,4 @@
-/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016, 2018, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -92,7 +92,7 @@ int audio_notifier_deregister(char *client_name);
 static inline int audio_notifier_register(char *client_name, int domain,
 					  struct notifier_block *nb)
 {
-	return -ENODEV;
+	return 0;
 }
 
 static inline int audio_notifier_deregister(char *client_name)