diff options
author | 2025-05-15 16:00:44 +0930 | |
---|---|---|
committer | 2025-05-21 23:07:23 +0200 | |
commit | f1706e0e1a74b095cbc60375b9b1e6205f5f4c98 (patch) | |
tree | f4b69549da60efe9027e0be14b140f9d962f06f5 /scripts/lib/kdoc/kdoc_files.py | |
parent | soc: aspeed: lpc: Fix impossible judgment condition (diff) | |
download | linux-rng-f1706e0e1a74b095cbc60375b9b1e6205f5f4c98.tar.xz linux-rng-f1706e0e1a74b095cbc60375b9b1e6205f5f4c98.zip |
soc: aspeed: Add NULL check in aspeed_lpc_enable_snoop()
devm_kasprintf() returns NULL when memory allocation fails. Currently,
aspeed_lpc_enable_snoop() does not check for this case, which results in a
NULL pointer dereference.
Add NULL check after devm_kasprintf() to prevent this issue.
Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev")
Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com>
Link: https://patch.msgid.link/20250401074647.21300-1-bsdhenrymartin@gmail.com
[arj: Fix Fixes: tag to use subject from 3772e5da4454]
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions