Merge "ueventd: fix confusing indentation" into main am: cc9de747df

Original change: https://android-review.googlesource.com/c/platform/system/core/+/3249129

Change-Id: Ia0f276cc4c623c1564c1c69bc302249d4f70cb09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/init/devices.cpp b/init/devices.cpp
index 5560c20..a478587 100644
--- a/init/devices.cpp
+++ b/init/devices.cpp
@@ -330,11 +330,11 @@
             if (gid != s.st_gid) {
                 new_group = gid;
             }
-        if (mode != s.st_mode) {
-            if (chmod(path.c_str(), mode) != 0) {
-                PLOG(ERROR) << "Cannot chmod " << path << " to " << mode;
+            if (mode != s.st_mode) {
+                if (chmod(path.c_str(), mode) != 0) {
+                    PLOG(ERROR) << "Cannot chmod " << path << " to " << mode;
+                }
             }
-        }
         } else {
             PLOG(ERROR) << "Cannot stat " << path;
         }