[Sound-open-firmware] [PATCH 10/10] ipc: remove unnecessary tests

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Mon Sep 25 21:52:18 CEST 2017


Last test would always evaluate as true, refactor to fold equal and
less than case as one

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
 src/ipc/byt-ipc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/ipc/byt-ipc.c b/src/ipc/byt-ipc.c
index 077fdde..fd1ad1e 100644
--- a/src/ipc/byt-ipc.c
+++ b/src/ipc/byt-ipc.c
@@ -132,12 +132,9 @@ void ipc_platform_do_cmd(struct ipc *ipc)
 	err = ipc_cmd();
 	if (err > 0) {
 		goto done; /* reply created and copied by cmd() */
-	} else if (err < 0) {
+	} else {
 		/* send std error reply */
 		reply.error = err;
-	} else if (err == 0) {
-		/* send std reply */
-		reply.error = 0;
 	}
 
 	/* send std error/ok reply */
-- 
2.11.0



More information about the Sound-open-firmware mailing list