aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorIliyan Malchev <malchev@google.com>2011-11-16 14:22:55 -0800
committerIliyan Malchev <malchev@google.com>2011-11-16 14:22:55 -0800
commit0f4b4dfe0aac9cf898914b0d1389a131f99e579f (patch)
treef04555a32bf2dadaff4ae827ba14fb93451a73eb /drivers/remoteproc
parent874fc124aa9deca2cde97007f590cff0cec22564 (diff)
parent48b9192487b404428ad662d5a1a1976754ade33b (diff)
downloadkernel_samsung_tuna-0f4b4dfe0aac9cf898914b0d1389a131f99e579f.tar.gz
kernel_samsung_tuna-0f4b4dfe0aac9cf898914b0d1389a131f99e579f.tar.bz2
kernel_samsung_tuna-0f4b4dfe0aac9cf898914b0d1389a131f99e579f.zip
Merge branch 'android-omap-3.0' into android-omap-tuna-3.0
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/remoteproc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc.c b/drivers/remoteproc/remoteproc.c
index 907fc011bf0..43d2fb21ccc 100644
--- a/drivers/remoteproc/remoteproc.c
+++ b/drivers/remoteproc/remoteproc.c
@@ -58,6 +58,13 @@ static ssize_t rproc_format_trace_buf(char __user *userbuf, size_t count,
int *w_idx;
int i, w_pos;
+ /* When src is NULL, the remoteproc is offline. */
+ if (!src)
+ return -EIO;
+
+ if (size < 2 * sizeof(u32))
+ return -EINVAL;
+
/* Assume write_idx is the penultimate byte in the buffer trace*/
size = size - (sizeof(u32) * 2);
w_idx = (int *)(buf + size);