Skip to content

Commit 797779d

Browse files
TomChang19kartben
authored andcommitted
mgmt: ec_host_cmd: npcx: remove the SHI enable in the init
This commit removes the SHI enable in the initialization. It can be enabled by the application explicitly calling it when needed. The SHI backend relies on the application layer to provide a data buffer for EC Host Commands. If SHI is enabled before this buffer is initialized, there is a risk that the driver may access a NULL buffer, leading to a system panic. Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
1 parent 6dff8dc commit 797779d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_npcx.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,8 +1000,6 @@ static int shi_npcx_init_registers(const struct device *dev)
10001000
IRQ_CONNECT(DT_INST_IRQN(0), DT_INST_IRQ(0, priority), shi_npcx_isr, DEVICE_DT_INST_GET(0),
10011001
0);
10021002

1003-
shi_npcx_enable(dev);
1004-
10051003
return ret;
10061004
}
10071005

0 commit comments

Comments
 (0)