Thread (18 messages) 18 messages, 5 authors, 2015-03-03

Lifecycle

  1. Posted Sebastian Reichel <sre@kernel.org>
  2. Acked-by Carlos Chinea

[PATCH 3/9] HSI: cmt_speech: Return error if HSI port not configured

From: Sebastian Reichel <sre@kernel.org>
Date: 2015-03-02 04:40:01
Also in: linux-omap, lkml
Subsystem: hsi subsystem, the rest · Maintainers: Sebastian Reichel, Linus Torvalds

From: Kai Vehmanen <redacted>

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

Signed-off-by: Kai Vehmanen <redacted>
Acked-by: Carlos Chinea <redacted>
Signed-off-by: Joni Lapilainen <redacted>
Signed-off-by: Sebastian Reichel <sre@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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help