aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tcm825x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tcm825x.c')
-rw-r--r--drivers/media/video/tcm825x.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/media/video/tcm825x.c b/drivers/media/video/tcm825x.c
index b90e9da3167d..54681a535822 100644
--- a/drivers/media/video/tcm825x.c
+++ b/drivers/media/video/tcm825x.c
@@ -850,7 +850,6 @@ static int tcm825x_probe(struct i2c_client *client,
850 const struct i2c_device_id *did) 850 const struct i2c_device_id *did)
851{ 851{
852 struct tcm825x_sensor *sensor = &tcm825x; 852 struct tcm825x_sensor *sensor = &tcm825x;
853 int rval;
854 853
855 if (i2c_get_clientdata(client)) 854 if (i2c_get_clientdata(client))
856 return -EBUSY; 855 return -EBUSY;
@@ -871,11 +870,7 @@ static int tcm825x_probe(struct i2c_client *client,
871 sensor->pix.height = tcm825x_sizes[QVGA].height; 870 sensor->pix.height = tcm825x_sizes[QVGA].height;
872 sensor->pix.pixelformat = V4L2_PIX_FMT_RGB565; 871 sensor->pix.pixelformat = V4L2_PIX_FMT_RGB565;
873 872
874 rval = v4l2_int_device_register(sensor->v4l2_int_device); 873 return v4l2_int_device_register(sensor->v4l2_int_device);
875 if (rval)
876 i2c_set_clientdata(client, NULL);
877
878 return rval;
879} 874}
880 875
881static int tcm825x_remove(struct i2c_client *client) 876static int tcm825x_remove(struct i2c_client *client)
@@ -886,7 +881,6 @@ static int tcm825x_remove(struct i2c_client *client)
886 return -ENODEV; /* our client isn't attached */ 881 return -ENODEV; /* our client isn't attached */
887 882
888 v4l2_int_device_unregister(sensor->v4l2_int_device); 883 v4l2_int_device_unregister(sensor->v4l2_int_device);
889 i2c_set_clientdata(client, NULL);
890 884
891 return 0; 885 return 0;
892} 886}