summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunhee Seo <yuni.seo@samsung.com>2024-04-24 17:20:56 +0900
committerYunhee Seo <yuni.seo@samsung.com>2024-04-24 17:20:56 +0900
commitd4bd8cd1c172864a161fd2e1704a5926e0c9e7b8 (patch)
tree852e534cf608bfb3572a4864d79d55138f94410c
parenta8331002736d64345e0d9c0f142aae0ff8e14cae (diff)
downloaddevice-c4-d4bd8cd1c172864a161fd2e1704a5926e0c9e7b8.tar.gz
device-c4-d4bd8cd1c172864a161fd2e1704a5926e0c9e7b8.tar.bz2
device-c4-d4bd8cd1c172864a161fd2e1704a5926e0c9e7b8.zip
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>
-rw-r--r--hw/board/board.c4
-rw-r--r--hw/display/display.c4
-rw-r--r--hw/haptic/gpio.c4
-rw-r--r--hw/memory/memory.c1
-rw-r--r--hw/thermal/thermal.c4
-rw-r--r--hw/touchscreen/touchscreen.c4
6 files changed, 0 insertions, 21 deletions
diff --git a/hw/board/board.c b/hw/board/board.c
index 415d143..6670e57 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 265d597..d6f5edd 100644
--- a/hw/display/display.c
+++ b/hw/display/display.c
@@ -127,10 +127,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 cdcd7a3..d2a6a90 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 462b58a..b46dc40 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 d134b05..1e527a5 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 12402fb..9000bb9 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;
}