mediatek: media: Missing alloc null test

Joe Perches posted 1 patch 8 months, 4 weeks ago
mediatek: media: Missing alloc null test
Posted by Joe Perches 8 months, 4 weeks ago
There's a missing NULL alloc test here:

It doesn't appear obvious what a proper fix is.

diff -u -p ./drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c /tmp/nothing/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c
--- ./drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c
+++ /tmp/nothing/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c
@@ -79,7 +79,6 @@ struct mtk_vcodec_fw *mtk_vcodec_fw_scp_
 	}
 
 	fw = devm_kzalloc(&plat_dev->dev, sizeof(*fw), GFP_KERNEL);
-	fw->type = SCP;
 	fw->ops = &mtk_vcodec_rproc_msg;
 	fw->scp = scp;