projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
remoteproc: Check for NULL firmwares in sysfs interface
[linux-2.6-microblaze.git]
/
drivers
/
remoteproc
/
remoteproc_sysfs.c
diff --git
a/drivers/remoteproc/remoteproc_sysfs.c
b/drivers/remoteproc/remoteproc_sysfs.c
index
47be411
..
3a4c3d7
100644
(file)
--- a/
drivers/remoteproc/remoteproc_sysfs.c
+++ b/
drivers/remoteproc/remoteproc_sysfs.c
@@
-48,6
+48,11
@@
static ssize_t firmware_store(struct device *dev,
}
len = strcspn(buf, "\n");
+ if (!len) {
+ dev_err(dev, "can't provide a NULL firmware\n");
+ err = -EINVAL;
+ goto out;
+ }
p = kstrndup(buf, len, GFP_KERNEL);
if (!p) {