This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 976641b4ce785cf660ddf2b7ff18768220cb1bef
Author: Bowen Wang <[email protected]>
AuthorDate: Thu Apr 23 17:36:52 2026 +0800

    drivers/rptun: continue ioctl foreach on failure instead of break
    
    rptun_ioctl_foreach() stopped at the first core whose ioctl failed, so
    the cores after it were skipped. In the panic and reboot notifiers this
    left those cores without the pause or reset request. Try every core and
    return the last error.
    
    Signed-off-by: Bowen Wang <[email protected]>
---
 drivers/rptun/rptun.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index c0b0e7577f6..ca50e6fea4f 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -1491,10 +1491,11 @@ static int rptun_ioctl_foreach(FAR const char *cpuname, 
int cmd,
     {
       if (!cpuname || !strcmp(RPTUN_GET_CPUNAME(priv->dev), cpuname))
         {
-          ret = rptun_do_ioctl(priv, cmd, value);
-          if (ret < 0)
+          int ret1 = rptun_do_ioctl(priv, cmd, value);
+
+          if (ret1 < 0)
             {
-              break;
+              ret = ret1;
             }
         }
     }

Reply via email to