From f1f4a2982ff5c51032f4d54e43db184fd6be50d5 Mon Sep 17 00:00:00 2001 From: Banajit Goswami Date: Mon, 2 Jul 2018 18:26:08 -0700 Subject: [PATCH] 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 --- include/dsp/audio_notifier.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dsp/audio_notifier.h b/include/dsp/audio_notifier.h index c7794ac602..7eda2c35c2 100644 --- a/include/dsp/audio_notifier.h +++ b/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)