]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bus: fsl-mc: Check return value of platform_get_resource()
authorSalah Triki <salah.triki@gmail.com>
Mon, 25 Aug 2025 09:34:35 +0000 (10:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:41 +0000 (11:56 +0200)
commite60d55692e6c8e951000343c39f3fc92cab57efc
treedd56a516d8acef586629befa690490ee82a9f30d
parentba7f7c2b2b3261e7def67018c38c69b626e0e66e
bus: fsl-mc: Check return value of platform_get_resource()

commit 25f526507b8ccc6ac3a43bc094d09b1f9b0b90ae upstream.

platform_get_resource() returns NULL in case of failure, so check its
return value and propagate the error in order to prevent NULL pointer
dereference.

Fixes: 6305166c8771 ("bus: fsl-mc: Add ACPI support for fsl-mc")
Cc: stable@vger.kernel.org
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/aKwuK6TRr5XNYQ8u@pc
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/fsl-mc/fsl-mc-bus.c