diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2008-12-29 10:04:37 +0100 |
---|---|---|
committer | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2008-12-29 10:04:37 +0100 |
commit | 9b0f12a43cdb0ac98249bf19752f1d8e02811bea (patch) | |
tree | 2028b4992d593301c982e0d18dfa585d606f3242 /linux/drivers/media/video/ov772x.c | |
parent | 4b9ee102f4db5d14a70062f25e53207638940b5d (diff) | |
download | mediapointer-dvb-s2-9b0f12a43cdb0ac98249bf19752f1d8e02811bea.tar.gz mediapointer-dvb-s2-9b0f12a43cdb0ac98249bf19752f1d8e02811bea.tar.bz2 |
ov772x: clear i2c client data on error and remove
From: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/ov772x.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
Diffstat (limited to 'linux/drivers/media/video/ov772x.c')
-rw-r--r-- | linux/drivers/media/video/ov772x.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linux/drivers/media/video/ov772x.c b/linux/drivers/media/video/ov772x.c index 5df4b0ff0..b6f6a79b7 100644 --- a/linux/drivers/media/video/ov772x.c +++ b/linux/drivers/media/video/ov772x.c @@ -946,8 +946,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; } @@ -957,6 +959,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; } |