summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/bridge/sii8620.c4
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);