fix typo

Change-Id: I6c725cfbdffad59a112a5204fbc0e0c0b5c6943d
diff --git a/libsensors/AkmSensor.cpp b/libsensors/AkmSensor.cpp
index cf1f736..0b60d77 100644
--- a/libsensors/AkmSensor.cpp
+++ b/libsensors/AkmSensor.cpp
@@ -118,6 +118,7 @@
                 mPendingEvents[Orientation].temperature = absinfo.value;
             }
             // disable temperature sensor, since it is not reported
+            flags = 0;
             ioctl(dev_fd, ECS_IOCTL_APP_SET_TFLAG, &flags);
         }
     }
@@ -208,7 +209,7 @@
             }
         }
         short delay = int64_t(wanted) / 1000000;
-        if (!ioctl(dev_fd, ECS_IOCTL_APP_SET_DELAY, &delay)) {
+        if (ioctl(dev_fd, ECS_IOCTL_APP_SET_DELAY, &delay)) {
             return -errno;
         }
     }