From 17a31a5613ab80c81f5d24efba72e2622f8cd881 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Thu, 20 Jul 2023 09:20:39 +0300 Subject: [PATCH] px4_init.cpp: Properly check the return value of mounting procfs Signed-off-by: Jukka Laitinen --- platforms/nuttx/src/px4/common/px4_init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/nuttx/src/px4/common/px4_init.cpp b/platforms/nuttx/src/px4/common/px4_init.cpp index baa35d0f648f..6f62904d294a 100644 --- a/platforms/nuttx/src/px4/common/px4_init.cpp +++ b/platforms/nuttx/src/px4/common/px4_init.cpp @@ -169,7 +169,7 @@ int px4_platform_init() #if defined(CONFIG_FS_PROCFS) int ret_mount_procfs = mount(nullptr, "/proc", "procfs", 0, nullptr); - if (ret < 0) { + if (ret_mount_procfs < 0) { syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret_mount_procfs); }