Remove free data section when the module exits 35/310235/1 accepted/tizen/unified/20240614.084943 accepted/tizen/unified/dev/20240620.010501
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 24 Apr 2024 08:20:56 +0000 (17:20 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Wed, 24 Apr 2024 08:20:56 +0000 (17:20 +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: If15d94024ba1db89912c9787da870bcfd60424e3
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 415d1435724e07e71a1085f7d1a054bcfa0a89bf..6670e5749790d382480cd0dbf3dbb7d96ecc0207 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 265d597e11b72db61f1e32b96617740cd90722e6..d6f5edde42bae2e10d321cb611fa1605857faef9 100644 (file)
@@ -127,10 +127,6 @@ static int display_init(void **data)
 
 static int display_exit(void *data)
 {
-       if (!data)
-               return 0;
-
-       free(data);
        return 0;
 }
 
index cdcd7a3be3c982f4e077ce483e9556f8c53efff3..d2a6a90b29113a1a1e07aba704cac7a3a40dab2e 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 462b58a84772b056d15c218d170a4601c205e238..b46dc403d901b40426e0bf0f7c0934adcb897925 100644 (file)
@@ -104,7 +104,6 @@ static int memory_init(void **data)
 
 static int memory_exit(void *data)
 {
-       free(data);
        return 0;
 }
 
index d134b056cb2147c6a0f1be537c07e376b3dec10c..1e527a565693fcc0df3339c7b943f5f052b89a77 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 12402fbca87cabe7aa5bbcd99896e670b18d1b7f..9000bb95d88752504bf359179f82d02855da263b 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;
 }