[PATCH v2] genirq/irq_sim: Initialize pointers properly.
From: Gyeyoung Baek
Date: Thu Jun 12 2025 - 08:48:42 EST
Initialize `ops` member's pointers properly.
Signed-off-by: Gyeyoung Baek <gye976@xxxxxxxxx>
---
Changelog:
v2:
- Edit commit message and subject.
- Use kzalloc() to initialize simply.
---
kernel/irq/irq_sim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/irq_sim.c b/kernel/irq/irq_sim.c
index 1a3d483548e2..ae4c9cbd1b4b 100644
--- a/kernel/irq/irq_sim.c
+++ b/kernel/irq/irq_sim.c
@@ -202,7 +202,7 @@ struct irq_domain *irq_domain_create_sim_full(struct fwnode_handle *fwnode,
void *data)
{
struct irq_sim_work_ctx *work_ctx __free(kfree) =
- kmalloc(sizeof(*work_ctx), GFP_KERNEL);
+ kzalloc(sizeof(*work_ctx), GFP_KERNEL);
if (!work_ctx)
return ERR_PTR(-ENOMEM);
--
2.43.0