diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2021-03-12 17:24:37 +0100 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2021-03-18 13:54:51 +0100 |
commit | 16324fc8def1c08a92261089aaf503aca3381aa6 (patch) | |
tree | 5fb7c2e3a427b909e54532167c618fb143f3c6d8 /drivers/remoteproc | |
parent | remoteproc: qcom_q6v5_mss: Validate p_filesz in ELF loader (diff) | |
download | linux-16324fc8def1c08a92261089aaf503aca3381aa6.tar.xz linux-16324fc8def1c08a92261089aaf503aca3381aa6.zip |
remoteproc: Remove useless check in rproc_del()
Whether started at probe() time or thereafter from the command
line, a remote processor needs to be shut down before the final
cleanup phases can happen. Otherwise the system may be left in
an unpredictable state where the remote processor is expecting
the remoteproc core to be providing services when in fact it
no longer exist.
Invariably calling rproc_shutdown() is fine since it will return
immediately if the remote processor has already been switched
off.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Link: https://lore.kernel.org/r/20210312162453.1234145-2-mathieu.poirier@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 5071cdbfc926..4c2e678732f5 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -2353,10 +2353,8 @@ int rproc_del(struct rproc *rproc) if (!rproc) return -EINVAL; - /* if rproc is marked always-on, rproc_add() booted it */ /* TODO: make sure this works with rproc->power > 1 */ - if (rproc->auto_boot) - rproc_shutdown(rproc); + rproc_shutdown(rproc); mutex_lock(&rproc->lock); rproc->state = RPROC_DELETED; |