summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-02-18 16:20:17 +1000
committerDave Airlie <airlied@redhat.com>2014-02-18 16:20:17 +1000
commit3f0606cbd935067928a6e1d555a0e72c8a572b74 (patch)
treec413ade78f373cfdd5b9023f8529ca70868e9fc1 /drivers/gpu
parent60f76eab19e3903e810bdc3ec846c158efcd2e21 (diff)
parent71c68c4fc9bdcd6e46107a0f40b50a523f3b4fe0 (diff)
downloadop-kernel-dev-3f0606cbd935067928a6e1d555a0e72c8a572b74.zip
op-kernel-dev-3f0606cbd935067928a6e1d555a0e72c8a572b74.tar.gz
Merge branch 'tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-fixes
fix for leak in tda998x * 'tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox: drm/i2c: tda998x: Fix memory leak in tda998x_encoder_init error path.
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i2c/tda998x_drv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index fa18cf3..faa77f5 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1151,8 +1151,10 @@ tda998x_encoder_init(struct i2c_client *client,
priv->current_page = 0xff;
priv->cec = i2c_new_dummy(client->adapter, 0x34);
- if (!priv->cec)
+ if (!priv->cec) {
+ kfree(priv);
return -ENODEV;
+ }
priv->dpms = DRM_MODE_DPMS_OFF;
encoder_slave->slave_priv = priv;
OpenPOWER on IntegriCloud