gpio: Change to call flock with void type conversion 21/289521/2 accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20230327.042621
authorTaeminYeom <taemin.yeom@samsung.com>
Thu, 9 Mar 2023 06:04:28 +0000 (15:04 +0900)
committerTaeminYeom <taemin.yeom@samsung.com>
Thu, 9 Mar 2023 06:17:36 +0000 (15:17 +0900)
In the API "gpio_modern_set_direction_xor_edge_mode",
After flock fd and set edge mode or direction, unlock fd.
This API doesn't use the return value of unlock and use
the return of setting edge mode or direction.
So, in calling fd unlock, change to call with void type conversion.

Change-Id: I7219b666e8779f74e4bff0978835e6b29af79269
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
src/peripheral_gpio_modern_api.c

index 6b59604..0aa0cc1 100644 (file)
@@ -173,7 +173,7 @@ int gpio_modern_set_direction_xor_edge_mode(struct gpio_modern_data *mdata, peri
                ret = __create_linehandle(mdata, direction);
 
        /* Unlock at the end */
-       flock(mdata->fd_chip, LOCK_UN);
+       (void)flock(mdata->fd_chip, LOCK_UN);
        return ret;
 }