Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git] / drivers / media / video / tcm825x.c
index b30c492..54681a5 100644 (file)
@@ -850,7 +850,6 @@ static int tcm825x_probe(struct i2c_client *client,
                         const struct i2c_device_id *did)
 {
        struct tcm825x_sensor *sensor = &tcm825x;
-       int rval;
 
        if (i2c_get_clientdata(client))
                return -EBUSY;
@@ -871,14 +870,10 @@ static int tcm825x_probe(struct i2c_client *client,
        sensor->pix.height = tcm825x_sizes[QVGA].height;
        sensor->pix.pixelformat = V4L2_PIX_FMT_RGB565;
 
-       rval = v4l2_int_device_register(sensor->v4l2_int_device);
-       if (rval)
-               i2c_set_clientdata(client, NULL);
-
-       return rval;
+       return v4l2_int_device_register(sensor->v4l2_int_device);
 }
 
-static int __exit tcm825x_remove(struct i2c_client *client)
+static int tcm825x_remove(struct i2c_client *client)
 {
        struct tcm825x_sensor *sensor = i2c_get_clientdata(client);
 
@@ -886,7 +881,6 @@ static int __exit tcm825x_remove(struct i2c_client *client)
                return -ENODEV; /* our client isn't attached */
 
        v4l2_int_device_unregister(sensor->v4l2_int_device);
-       i2c_set_clientdata(client, NULL);
 
        return 0;
 }
@@ -902,7 +896,7 @@ static struct i2c_driver tcm825x_i2c_driver = {
                .name = TCM825X_NAME,
        },
        .probe  = tcm825x_probe,
-       .remove = __exit_p(tcm825x_remove),
+       .remove = tcm825x_remove,
        .id_table = tcm825x_id,
 };