Commit c558f69c authored by Mirela Rabulea's avatar Mirela Rabulea Committed by Hans Verkuil

media: imx-jpeg: Fix Coverity issue in probe

Possible dereference null return after of_match_node,
so check for NULL of_id.
Signed-off-by: default avatarMirela Rabulea <mirela.rabulea@oss.nxp.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 6a394d56
......@@ -2163,6 +2163,8 @@ static int mxc_jpeg_probe(struct platform_device *pdev)
unsigned int slot;
of_id = of_match_node(mxc_jpeg_match, dev->of_node);
if (!of_id)
return -ENODEV;
mode = *(const int *)of_id->data;
jpeg = devm_kzalloc(dev, sizeof(struct mxc_jpeg_dev), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment