From 0253cb9698f0924fa7ff0dfcbc51c39409a97f73 Mon Sep 17 00:00:00 2001 From: Karthikeyan Mani Date: Fri, 30 Nov 2018 11:14:36 -0800 Subject: [PATCH] dsp: q6afe: return error on no configuration data Move the return value to within the error check condition to avoid returning error for valid scenarios too. Change-Id: I718786d9eb3c779a85da3a4cb3929806692f5424 Signed-off-by: Karthikeyan Mani --- dsp/q6afe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dsp/q6afe.c b/dsp/q6afe.c index 8ae2739e234a..4f170fcce2e7 100644 --- a/dsp/q6afe.c +++ b/dsp/q6afe.c @@ -2776,9 +2776,10 @@ int afe_send_spdif_ch_status_cfg(struct afe_param_id_spdif_ch_status_cfg struct param_hdr_v3 param_hdr; int ret = 0; - if (!ch_status_cfg) + if (!ch_status_cfg) { pr_err("%s: Error, no configuration data\n", __func__); - return -EINVAL; + return -EINVAL; + } memset(¶m_hdr, 0, sizeof(param_hdr)); param_hdr.module_id = AFE_MODULE_AUDIO_DEV_INTERFACE;