diff mbox series

mediatek: media: Missing alloc null test

Message ID 102e5c65e07ebdade5400ca711fba131a37027a8.camel@perches.com (mailing list archive)
State New, archived
Headers show
Series mediatek: media: Missing alloc null test | expand

Commit Message

Joe Perches Feb. 17, 2024, 7:44 p.m. UTC
There's a missing NULL alloc test here:

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

Patch

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;