summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc/remoteproc_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/remoteproc/remoteproc_sysfs.c')
-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 bbfa238e4707..23c0dc1ddc34 100644
--- a/drivers/remoteproc/remoteproc_sysfs.c
+++ b/drivers/remoteproc/remoteproc_sysfs.c
@@ -202,7 +202,8 @@ static ssize_t state_store(struct device *dev,
if (ret)
dev_err(&rproc->dev, "Boot failed: %d\n", ret);
} else if (sysfs_streq(buf, "stop")) {
- if (rproc->state != RPROC_RUNNING)
+ if (rproc->state != RPROC_RUNNING &&
+ rproc->state != RPROC_ATTACHED)
return -EINVAL;
rproc_shutdown(rproc);