From: Kai Vehmanen <kai.vehma...@nokia.com>

If HSI port is not configured by ssi_protocol, return an error from
char device open.

Signed-off-by: Kai Vehmanen <kai.vehma...@nokia.com>
Acked-by: Carlos Chinea <carlos.chi...@nokia.com>
Signed-off-by: Joni Lapilainen <joni.lapilai...@gmail.com>
Signed-off-by: Sebastian Reichel <s...@kernel.org>
---
 drivers/hsi/clients/cmt_speech.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c
index 389eafb..56846c9 100644
--- a/drivers/hsi/clients/cmt_speech.c
+++ b/drivers/hsi/clients/cmt_speech.c
@@ -1037,6 +1037,13 @@ static int cs_hsi_start(struct cs_hsi_iface **hi, struct 
hsi_client *cl,
                dev_err(&cl->device, "Could not get HSI master client\n");
                goto leave4;
        }
+       if (!ssip_slave_running(hsi_if->master)) {
+               err = -ENODEV;
+               dev_err(&cl->device,
+                               "HSI port not initialized\n");
+               goto leave4;
+       }
+
        hsi_if->iface_state = CS_STATE_OPENED;
        local_bh_disable();
        cs_hsi_read_on_control(hsi_if);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to