diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2015-11-23 14:30:51 +0100 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:48:55 +0900 |
commit | fbb014bde3480241207e737a5644042bd36c0ec2 (patch) | |
tree | db6a9fbb9b57b05e68341f25db8a4fd8ebb96b7c /drivers | |
parent | 48225e34923f7f0a742937e0030d36577a1246ce (diff) |
sii8620: fix edid memory leak
In case of error during edid retrieval, allocated memory should be freed.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/bridge/sii8620.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/sii8620.c b/drivers/gpu/drm/bridge/sii8620.c index 60940724a2e8..1bd9cf30889c 100644 --- a/drivers/gpu/drm/bridge/sii8620.c +++ b/drivers/gpu/drm/bridge/sii8620.c @@ -501,8 +501,10 @@ static void sii8620_fetch_edid(struct sii8620 *ctx) if (int3 & BIT_DDC_CMD_DONE) break; - if (!(cbus & BIT_CBUS_STATUS_CBUS_CONNECTED)) + if (!(cbus & BIT_CBUS_STATUS_CBUS_CONNECTED)) { + kfree(edid); return; + } } while (1); sii8620_readb(ctx, REG_DDC_STATUS); |