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:
Colin Ian King <colin.king@canonical.com>
Acked-by:
Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please sign in to comment