summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov772x.c
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2008-12-29 06:04:37 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 09:40:29 -0200
commit77fe3d4a44f76653263eb8671d7909ab0fdafd71 (patch)
treecda4c1f3afeac2365821e2ce62dccbd73cfca258 /drivers/media/video/ov772x.c
parent7dcb212eee1d3833073ba0458ca5a603b7b05cc5 (diff)
downloadop-kernel-dev-77fe3d4a44f76653263eb8671d7909ab0fdafd71.zip
op-kernel-dev-77fe3d4a44f76653263eb8671d7909ab0fdafd71.tar.gz
V4L/DVB (10097): ov772x: clear i2c client data on error and remove
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ov772x.c')
-rw-r--r--drivers/media/video/ov772x.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index e7fb553..b3346c9 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
@@ -942,8 +942,10 @@ static int ov772x_probe(struct i2c_client *client,
ret = soc_camera_device_register(icd);
- if (ret)
+ if (ret) {
+ i2c_set_clientdata(client, NULL);
kfree(priv);
+ }
return ret;
}
@@ -953,6 +955,7 @@ static int ov772x_remove(struct i2c_client *client)
struct ov772x_priv *priv = i2c_get_clientdata(client);
soc_camera_device_unregister(&priv->icd);
+ i2c_set_clientdata(client, NULL);
kfree(priv);
return 0;
}
OpenPOWER on IntegriCloud