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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);