summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-02-18 07:20:17 +0100
committerDave Airlie <airlied@redhat.com>2014-02-18 07:20:17 +0100
commit3f0606cbd935067928a6e1d555a0e72c8a572b74 (patch)
treec413ade78f373cfdd5b9023f8529ca70868e9fc1 /drivers
parentMerge tag 'dma-buf-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff)
parentdrm/i2c: tda998x: Fix memory leak in tda998x_encoder_init error path. (diff)
downloadlinux-3f0606cbd935067928a6e1d555a0e72c8a572b74.tar.xz
linux-3f0606cbd935067928a6e1d555a0e72c8a572b74.zip
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')
-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 fa18cf374470..faa77f543a07 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;