]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: amphion: Guard memory allocation to catch failures
authorMing Qian <ming.qian@nxp.com>
Wed, 28 Aug 2024 13:01:24 +0000 (16:01 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 12 Oct 2024 14:28:24 +0000 (16:28 +0200)
commit7ade935392a35665f43dd37317ddb3ef1555378c
tree187eec91ad097287f2f7808789f2521aa9c799bd
parent9d31522aa55794d2fd6de59c2dcee85b3bfee745
media: amphion: Guard memory allocation to catch failures

The firmware will ask the driver for memory allocation, but it will not
check the completeness of the task. Therefore, the vpu will crash until
reboot. This code will guard this bug and make the driver fail gracefully
when memory allocation cannot be completed.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Reviewed-by: Zhou Peng <eagle.zhou@nxp.com>
Signed-off-by: Mihai Despotovici <mihai.despotovici@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/amphion/venc.c