commit | a4bfdcdd71349d765721a2b4ea4ea1179ccc7804 | [log] [tgz] |
---|---|---|
author | Iliyan Malchev <malchev@google.com> | Tue Jul 03 14:24:56 2012 -0700 |
committer | Iliyan Malchev <malchev@google.com> | Tue Jul 03 14:59:05 2012 -0700 |
tree | 8e0217b9e93cf0b9c9f49c8bfce03a331c4e156c | |
parent | a0899cecc6546674f9cfb219e50c0675cb855fa0 [diff] [blame] |
[ARM] msm: do not crash when subsystem not initialized Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/arch/arm/mach-msm/sysmon.c b/arch/arm/mach-msm/sysmon.c index 1305bd1..a03debd 100644 --- a/arch/arm/mach-msm/sysmon.c +++ b/arch/arm/mach-msm/sysmon.c
@@ -183,6 +183,9 @@ buf == NULL || len == 0) return -EINVAL; + if (!ss->chan_open) + return -ENODEV; + mutex_lock(&ss->lock); ret = sysmon_send_msg(ss, tx_buf, ARRAY_SIZE(tx_buf)); if (ret)