staging: vchiq_arm: Avoid NULL ptr deref in vchiq_dump_platform_instances
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 23 Jan 2022 20:02:21 +0000 (21:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jan 2022 15:30:16 +0000 (16:30 +0100)
commitaa899e686d442c63d50f4d369cc02dbbf0941cb0
treea45b1bf9e5a4675379a9126a60b0e347db3dac97
parent914813cc523cf8b32ca8735cbf3243256e87a5a3
staging: vchiq_arm: Avoid NULL ptr deref in vchiq_dump_platform_instances

vchiq_get_state() can return a NULL pointer. So handle this cases and
avoid a NULL pointer derefence in vchiq_dump_platform_instances.

Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1642968143-19281-17-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c