diff options
author | Iliyan Malchev <malchev@google.com> | 2011-11-16 14:22:55 -0800 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-11-16 14:22:55 -0800 |
commit | 0f4b4dfe0aac9cf898914b0d1389a131f99e579f (patch) | |
tree | f04555a32bf2dadaff4ae827ba14fb93451a73eb /drivers/remoteproc | |
parent | 874fc124aa9deca2cde97007f590cff0cec22564 (diff) | |
parent | 48b9192487b404428ad662d5a1a1976754ade33b (diff) | |
download | kernel_samsung_tuna-0f4b4dfe0aac9cf898914b0d1389a131f99e579f.zip kernel_samsung_tuna-0f4b4dfe0aac9cf898914b0d1389a131f99e579f.tar.gz kernel_samsung_tuna-0f4b4dfe0aac9cf898914b0d1389a131f99e579f.tar.bz2 |
Merge branch 'android-omap-3.0' into android-omap-tuna-3.0
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc.c b/drivers/remoteproc/remoteproc.c index 907fc01..43d2fb2 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); |