Merge series "ASoC: SOF: ipc: Small cleanups for message handler functions" from...
[linux-2.6-microblaze.git] / sound / soc / sof / ipc.c
index c7ca62e..5d41924 100644 (file)
@@ -309,7 +309,7 @@ static int sof_ipc_tx_message_unlocked(struct snd_sof_ipc *ipc, u32 header,
 
        spin_unlock_irq(&sdev->ipc_lock);
 
-       if (ret < 0) {
+       if (ret) {
                dev_err_ratelimited(sdev->dev,
                                    "error: ipc tx failed with error %d\n",
                                    ret);
@@ -319,10 +319,7 @@ static int sof_ipc_tx_message_unlocked(struct snd_sof_ipc *ipc, u32 header,
        ipc_log_header(sdev->dev, "ipc tx", msg->header);
 
        /* now wait for completion */
-       if (!ret)
-               ret = tx_wait_done(ipc, msg, reply_data);
-
-       return ret;
+       return tx_wait_done(ipc, msg, reply_data);
 }
 
 /* send IPC message from host to DSP */