Bug 219934

Summary: Missing null check in aspeed_lpc_enable_snoop
Product: Drivers Reporter: henry (bsdhenrymartin)
Component: Hardware MonitoringAssignee: Jean Delvare (jdelvare)
Status: NEW ---    
Severity: normal    
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description henry 2025-03-28 08:01:45 UTC
soc: aspeed: Add NULL check in aspeed_lpc_enable_snoop

devm_kasprintf() can return a NULL pointer on failure,but this lpc_snoop->chan[channel].miscdev.name returned value in aspeed_lpc_enable_snoop is not checked.
Add NULL check in aspeed_lpc_enable_snoop, to handle kernel NULL pointer dereference error.