Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[sfrench/cifs-2.6.git] / drivers / media / video / mt9v022.c
index e5bae4c9393b8b9e3d4a0c8acbcf770d627fe3bc..e7cd23cd63941ecb3380243f623960cf91c8ea31 100644 (file)
@@ -838,13 +838,13 @@ static struct v4l2_subdev_core_ops mt9v022_subdev_core_ops = {
 #endif
 };
 
-static int mt9v022_enum_fmt(struct v4l2_subdev *sd, int index,
+static int mt9v022_enum_fmt(struct v4l2_subdev *sd, unsigned int index,
                            enum v4l2_mbus_pixelcode *code)
 {
        struct i2c_client *client = sd->priv;
        struct mt9v022 *mt9v022 = to_mt9v022(client);
 
-       if ((unsigned int)index >= mt9v022->num_fmts)
+       if (index >= mt9v022->num_fmts)
                return -EINVAL;
 
        *code = mt9v022->fmts[index].code;
@@ -920,7 +920,6 @@ static int mt9v022_probe(struct i2c_client *client,
        ret = mt9v022_video_probe(icd, client);
        if (ret) {
                icd->ops = NULL;
-               i2c_set_clientdata(client, NULL);
                kfree(mt9v022);
        }
 
@@ -934,7 +933,6 @@ static int mt9v022_remove(struct i2c_client *client)
 
        icd->ops = NULL;
        mt9v022_video_remove(icd);
-       i2c_set_clientdata(client, NULL);
        client->driver = NULL;
        kfree(mt9v022);