media: venus: dec: Handle the case where find_format fails
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Tue, 26 Jul 2022 02:14:54 +0000 (04:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:12:55 +0000 (10:12 +0200)
commitfcc96e89b3ff488733dcfa34824962454610b3e2
tree17576163bf5c7e47a8d4647b2f3b61a04ee0dc74
parentb22b4823a0a5685be7fa8625019fe999ff3fbc2c
media: venus: dec: Handle the case where find_format fails

commit 06a2da340f762addc5935bf851d95b14d4692db2 upstream.

Debugging the decoder on msm8916 I noticed the vdec probe was crashing if
the fmt pointer was NULL.

A similar fix from Colin Ian King found by Coverity was implemented for the
encoder. Implement the same fix on the decoder.

Fixes: 7472c1c69138 ("[media] media: venus: vdec: add video decoder files")
Cc: stable@vger.kernel.org # v4.13+
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/qcom/venus/vdec.c