Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8677b1ac authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Tomi Valkeinen
Browse files

drm/omap: Fix error handling path in 'omap_dmm_probe()'



If we don't find a matching device node, we must free the memory allocated
in 'omap_dmm' a few lines above.

Fixes: 7cb0d6c1 ("drm/omap: fix TILER on OMAP5")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 4fbd8d19
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -638,7 +638,8 @@ static int omap_dmm_probe(struct platform_device *dev)
		match = of_match_node(dmm_of_match, dev->dev.of_node);
		match = of_match_node(dmm_of_match, dev->dev.of_node);
		if (!match) {
		if (!match) {
			dev_err(&dev->dev, "failed to find matching device node\n");
			dev_err(&dev->dev, "failed to find matching device node\n");
			return -ENODEV;
			ret = -ENODEV;
			goto fail;
		}
		}


		omap_dmm->plat_data = match->data;
		omap_dmm->plat_data = match->data;