Create temporary file to check wifi firmware state #3 29/192429/1
authorSeonah Moon <seonah1.moon@samsung.com>
Mon, 22 Oct 2018 09:31:20 +0000 (18:31 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Mon, 5 Nov 2018 11:08:43 +0000 (20:08 +0900)
Change-Id: I174f255dc49f2883b5ddc945e4375720327dc820

src/wifi.c

index 0bc5273..8d3303a 100755 (executable)
@@ -120,7 +120,7 @@ static void _update_wifi_firmware_state(void)
        mode_t mode = S_IRGRP | S_IWUSR | S_IXGRP;
 
        fd = creat(SPRD_CP2_FIRMWARE_STATE_PATH, mode);
-       if (fd > 0)
+       if (fd >= 0)
                close(fd);
        else
                DBG("Failed to create wifi firmware state file");