diff options
author | Dave Airlie <airlied@redhat.com> | 2014-02-18 16:20:17 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-02-18 16:20:17 +1000 |
commit | 3f0606cbd935067928a6e1d555a0e72c8a572b74 (patch) | |
tree | c413ade78f373cfdd5b9023f8529ca70868e9fc1 /drivers/gpu/drm | |
parent | 60f76eab19e3903e810bdc3ec846c158efcd2e21 (diff) | |
parent | 71c68c4fc9bdcd6e46107a0f40b50a523f3b4fe0 (diff) |
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/drm')
-rw-r--r-- | drivers/gpu/drm/i2c/tda998x_drv.c | 4 |
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 fa18cf37447..faa77f543a0 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; |