Remove free data section when the module exits 37/310237/1 accepted/tizen/unified/20240614.085003 accepted/tizen/unified/dev/20240620.010526
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 24 Apr 2024 08:22:42 +0000 (17:22 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Wed, 24 Apr 2024 08:22:42 +0000 (17:22 +0900)
In the hal backend module, when the moudle exits, the hal_backend_[module]_funcs was
handled from [module]_exit function.
The data parameter is handed over from hal-api-common put_backend function.
And data is pointing to hal_backend_[module]_funcs, and free by hal-backend module.
As memory release operation moves to the hal-api-device side,
also double free operation is useless, thus it is deleted from hal-backend.

Change-Id: I43d1043df40cad6ddf97569f13ede1f2b2afd184
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
hw/board/board.c
hw/display/display.c
hw/haptic/gpio.c
hw/memory/memory.c
hw/thermal/thermal.c
hw/touchscreen/touchscreen.c

index 4f6dcc83231f90b167229041b6fd320bc23154a2..22d4136554c0c9c5d341d17ce75b51d0472e9ce2 100644 (file)
@@ -118,10 +118,6 @@ static int board_init(void **data)
 
 static int board_exit(void *data)
 {
-       if (!data)
-               return 0;
-
-       free(data);
        return 0;
 }
 
index 56a4965d8d2e4b87c57d7ae7a5ffe588714ee203..78f5d398f302c267d08c9df71150af2b26739bc2 100644 (file)
@@ -128,10 +128,6 @@ static int display_init(void **data)
 
 static int display_exit(void *data)
 {
-       if (!data)
-               return 0;
-
-       free(data);
        return 0;
 }
 
index cd2a2955726eecf8474965c42ed49ce37c82a347..bd9f4ed4b72cde1dcd99ce27cfeae6e97272aeb9 100644 (file)
@@ -338,10 +338,6 @@ static int haptic_init(void **data)
 
 static int haptic_exit(void *data)
 {
-    if (!data)
-        return -EINVAL;
-
-    free(data);
     return 0;
 }
 
index ae4aed0ca1048740fb31ca2f8da76a8e5dd25258..a09633726089dd35ef3cca054fcc943073d66193 100644 (file)
@@ -104,7 +104,6 @@ static int memory_init(void **data)
 
 static int memory_exit(void *data)
 {
-       free(data);
        return 0;
 }
 
index 72628b58c96c1f32254c2aa8ef14efeb40b0923d..14c9c1dcb77d41873826c18484e1c6b919887876 100644 (file)
@@ -136,10 +136,6 @@ static int thermal_init(void **data)
 
 static int thermal_exit(void *data)
 {
-       if (!data)
-               return 0;
-
-       free(data);
        return 0;
 }
 
index c86bc32e9c3d24c46ff57d9006377f3cc390c8e5..6af87547822a7a46ebc231c1e3b33a432d7ef380 100644 (file)
@@ -109,10 +109,6 @@ static int touchscreen_init(void **data)
 
 static int touchscreen_exit(void *data)
 {
-       if (!data)
-               return 0;
-
-       free(data);
        return 0;
 }