]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serial: Fix potential null-ptr-deref in mlb_usio_probe()
authorHenry Martin <bsdhenrymartin@gmail.com>
Thu, 3 Apr 2025 07:03:39 +0000 (15:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:16 +0000 (11:05 +0100)
commit19fd9f5a69363d33079097d866eb6082d61bf31d
treeec6359a0e47b467be4e0e1b2a20a4f3033691309
parent0a1e16a6cbf4452b46f20b862d6141a1e90844ee
serial: Fix potential null-ptr-deref in mlb_usio_probe()

[ Upstream commit 86bcae88c9209e334b2f8c252f4cc66beb261886 ]

devm_ioremap() can return NULL on error. Currently, mlb_usio_probe()
does not check for this case, which could result in a NULL pointer
dereference.

Add NULL check after devm_ioremap() to prevent this issue.

Fixes: ba44dc043004 ("serial: Add Milbeaut serial control")
Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com>
Link: https://lore.kernel.org/r/20250403070339.64990-1-bsdhenrymartin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/milbeaut_usio.c