From: Yunhee Seo Date: Wed, 24 Apr 2024 08:22:42 +0000 (+0900) Subject: Remove free data section when the module exits X-Git-Tag: accepted/tizen/unified/20240614.085003^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7342f959728d1e502ade2b176f10aa277f903c0a;p=platform%2Fhal%2Fbackend%2Fvim3%2Fdevice-vim3.git Remove free data section when the module exits 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 --- diff --git a/hw/board/board.c b/hw/board/board.c index 4f6dcc8..22d4136 100644 --- a/hw/board/board.c +++ b/hw/board/board.c @@ -118,10 +118,6 @@ static int board_init(void **data) static int board_exit(void *data) { - if (!data) - return 0; - - free(data); return 0; } diff --git a/hw/display/display.c b/hw/display/display.c index 56a4965..78f5d39 100644 --- a/hw/display/display.c +++ b/hw/display/display.c @@ -128,10 +128,6 @@ static int display_init(void **data) static int display_exit(void *data) { - if (!data) - return 0; - - free(data); return 0; } diff --git a/hw/haptic/gpio.c b/hw/haptic/gpio.c index cd2a295..bd9f4ed 100644 --- a/hw/haptic/gpio.c +++ b/hw/haptic/gpio.c @@ -338,10 +338,6 @@ static int haptic_init(void **data) static int haptic_exit(void *data) { - if (!data) - return -EINVAL; - - free(data); return 0; } diff --git a/hw/memory/memory.c b/hw/memory/memory.c index ae4aed0..a096337 100644 --- a/hw/memory/memory.c +++ b/hw/memory/memory.c @@ -104,7 +104,6 @@ static int memory_init(void **data) static int memory_exit(void *data) { - free(data); return 0; } diff --git a/hw/thermal/thermal.c b/hw/thermal/thermal.c index 72628b5..14c9c1d 100644 --- a/hw/thermal/thermal.c +++ b/hw/thermal/thermal.c @@ -136,10 +136,6 @@ static int thermal_init(void **data) static int thermal_exit(void *data) { - if (!data) - return 0; - - free(data); return 0; } diff --git a/hw/touchscreen/touchscreen.c b/hw/touchscreen/touchscreen.c index c86bc32..6af8754 100644 --- a/hw/touchscreen/touchscreen.c +++ b/hw/touchscreen/touchscreen.c @@ -109,10 +109,6 @@ static int touchscreen_init(void **data) static int touchscreen_exit(void *data) { - if (!data) - return 0; - - free(data); return 0; }