drm/imx: Fix memory leak in imx_pd_connector_get_modes
authorJosé Expósito <jose.exposito89@gmail.com>
Sat, 8 Jan 2022 16:52:30 +0000 (17:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:59:16 +0000 (20:59 +0200)
commit31e449302ed00c38d4068443cf0243279701ab28
treef1e9ef8e64c4e90809b90ac84f9cfb2558b0b297
parentc1e96348dbeb1820d366c7a459a6f3fa2dc3e32e
drm/imx: Fix memory leak in imx_pd_connector_get_modes

[ Upstream commit bce81feb03a20fca7bbdd1c4af16b4e9d5c0e1d3 ]

Avoid leaking the display mode variable if of_get_drm_display_mode
fails.

Fixes: 76ecd9c9fb24 ("drm/imx: parallel-display: check return code from of_get_drm_display_mode()")
Addresses-Coverity-ID: 1443943 ("Resource leak")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20220108165230.44610-1-jose.exposito89@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/imx/parallel-display.c