media: drivers/media/v4l2-core/v4l2-h264 : add detection of null pointers
authorDong Chuanjian <chuanjian@nfschina.com>
Tue, 27 Dec 2022 02:36:25 +0000 (03:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:44 +0000 (09:33 +0100)
commitece8818968a867222f2cc4e21aa4e4f912facd51
tree86f3934718f48744a78e2e5a294c5521da125f36
parent80f98dc3ebf1685cbf73a990df3eceda34978c5e
media: drivers/media/v4l2-core/v4l2-h264 : add detection of null pointers

[ Upstream commit be3ae7cf4326e95bb1d5413b63baabc26f4a1324 ]

When the pointer variable is judged to be null, null is returned
directly.

[hverkuil: fix two checkpatch warnings]

Signed-off-by: Dong Chuanjian <chuanjian@nfschina.com>
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Fixes: d3f756ad629b ("media: v4l2: Trace calculated p/b0/b1 initial reflist")
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/v4l2-core/v4l2-h264.c