Skip to content
Commit b7c56d7b authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

drivers: staging: cedrus: find ctx before dereferencing it ctx



Currently if count is an invalid value the v4l2_info message will
dereference a null ctx pointer to get the dev information. Fix
this by finding ctx first and then checking for an invalid count,
this way ctxt will be non-null hence avoiding the null pointer
dereference.

Detected by CoverityScan, CID#1475337 ("Explicit null dereferenced")

Fixes: 50e76151 ("media: platform: Add Cedrus VPU decoder driver")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3e43d8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment