diff options
| -rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 2 | ||||
| -rw-r--r-- | drivers/remoteproc/remoteproc_debugfs.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 8b3130f22b42..9e03d158f411 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c | |||
| @@ -1478,6 +1478,8 @@ module_init(remoteproc_init); | |||
| 1478 | 1478 | ||
| 1479 | static void __exit remoteproc_exit(void) | 1479 | static void __exit remoteproc_exit(void) |
| 1480 | { | 1480 | { |
| 1481 | ida_destroy(&rproc_dev_index); | ||
| 1482 | |||
| 1481 | rproc_exit_debugfs(); | 1483 | rproc_exit_debugfs(); |
| 1482 | } | 1484 | } |
| 1483 | module_exit(remoteproc_exit); | 1485 | module_exit(remoteproc_exit); |
diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index 9d30809bb407..916af5096f57 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c | |||
| @@ -156,7 +156,7 @@ rproc_recovery_write(struct file *filp, const char __user *user_buf, | |||
| 156 | char buf[10]; | 156 | char buf[10]; |
| 157 | int ret; | 157 | int ret; |
| 158 | 158 | ||
| 159 | if (count > sizeof(buf)) | 159 | if (count < 1 || count > sizeof(buf)) |
| 160 | return count; | 160 | return count; |
| 161 | 161 | ||
| 162 | ret = copy_from_user(buf, user_buf, count); | 162 | ret = copy_from_user(buf, user_buf, count); |
