aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/remoteproc/remoteproc_sysfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c
index 6b7e8b2b43be..0c47bc0bb36a 100644
--- a/drivers/remoteproc/remoteproc_sysfs.c
+++ b/drivers/remoteproc/remoteproc_sysfs.c
@@ -100,7 +100,8 @@ static ssize_t state_store(struct device *dev,
100 module_put(dev->parent->driver->owner); 100 module_put(dev->parent->driver->owner);
101 } 101 }
102 } else if (sysfs_streq(buf, "stop")) { 102 } else if (sysfs_streq(buf, "stop")) {
103 if (rproc->state != RPROC_RUNNING) 103 if (rproc->state != RPROC_RUNNING &&
104 rproc->state != RPROC_SUSPENDED)
104 return -EINVAL; 105 return -EINVAL;
105 106
106 rproc_shutdown(rproc); 107 rproc_shutdown(rproc);