media: coda: Add check for dcoda_iram_alloc
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Thu, 17 Nov 2022 06:56:52 +0000 (14:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:18 +0000 (13:14 +0100)
commitb99872178e7473f21904fdeea38109275aad8ae8
tree4db4d56809e0b795e01bf99043ce387cfda50678
parentfbf081ebe268c1149b5507ea71a2c985824176e2
media: coda: Add check for dcoda_iram_alloc

[ Upstream commit 6b8082238fb8bb20f67e46388123e67a5bbc558d ]

As the coda_iram_alloc may return NULL pointer,
it should be better to check the return value
in order to avoid NULL poineter dereference,
same as the others.

Fixes: b313bcc9a467 ("[media] coda: simplify IRAM setup")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/coda/coda-bit.c