staging: vchiq_core: handle NULL result of find_service_by_handle
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 23 Jan 2022 20:02:22 +0000 (21:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:59:11 +0000 (20:59 +0200)
commit42f2142a337ee372455574809fc924580a7e51b2
treecdff1ed39414df8b4e0a250ec1d4c925c30b1b52
parent176df12b38c70b0a45e6392a0ee5bc83489dfc29
staging: vchiq_core: handle NULL result of find_service_by_handle

[ Upstream commit ca225857faf237234d2fffe5d1919467dfadd822 ]

In case of an invalid handle the function find_servive_by_handle
returns NULL. So take care of this and avoid a NULL pointer dereference.

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-18-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c