diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2017-09-24 08:01:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-03 17:39:14 +0100 |
commit | 345dc6d499d8509ec9cc4b9b5b84a070ac87e0d5 (patch) | |
tree | 3b5449e1306ff99aecd721a171b653843f7a1a68 /drivers | |
parent | 464711a74ce3238c7ca07f903bed3189efd23831 (diff) | |
download | linux-stable-345dc6d499d8509ec9cc4b9b5b84a070ac87e0d5.tar.gz linux-stable-345dc6d499d8509ec9cc4b9b5b84a070ac87e0d5.tar.bz2 linux-stable-345dc6d499d8509ec9cc4b9b5b84a070ac87e0d5.zip |
drm/omap: Fix error handling path in 'omap_dmm_probe()'
[ Upstream commit 8677b1ac2db021ab30bb1fa34f1e56ebe0051ec3 ]
If we don't find a matching device node, we must free the memory allocated
in 'omap_dmm' a few lines above.
Fixes: 7cb0d6c17b96 ("drm/omap: fix TILER on OMAP5")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index 1dd3dafc59af..c60a85e82c6d 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -638,7 +638,8 @@ static int omap_dmm_probe(struct platform_device *dev) match = of_match_node(dmm_of_match, dev->dev.of_node); if (!match) { dev_err(&dev->dev, "failed to find matching device node\n"); - return -ENODEV; + ret = -ENODEV; + goto fail; } omap_dmm->plat_data = match->data; |