rmtfs: Exit even though there's no rprocfd

Attempting to shut down a system with rmtfs running without an
associated remoteproc results in systemd waiting forever for the
remoteproc code to never signal that it's done.

Instead exit immediately when signalled, when there's no associated
remoteproc.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Bjorn Andersson 2020-11-20 23:21:05 -06:00
parent 417f04a9a7
commit 710e6cf908

View File

@ -445,7 +445,10 @@ static int run_rmtfs(int rprocfd)
rproc_start();
for (;;) {
if (rprocfd >= 0 && sig_int_count == 1 && !sig_int_handled) {
if (sig_int_count == 1 && !sig_int_handled) {
if (rprocfd < 0)
break;
rproc_stop();
sig_int_handled = true;
} else if (sig_int_count > 1) {