aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov772x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ov772x.c')
-rw-r--r--drivers/media/video/ov772x.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index 7f8ece30c77b..34034a710214 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
@@ -1092,10 +1092,10 @@ static struct v4l2_subdev_core_ops ov772x_subdev_core_ops = {
1092#endif 1092#endif
1093}; 1093};
1094 1094
1095static int ov772x_enum_fmt(struct v4l2_subdev *sd, int index, 1095static int ov772x_enum_fmt(struct v4l2_subdev *sd, unsigned int index,
1096 enum v4l2_mbus_pixelcode *code) 1096 enum v4l2_mbus_pixelcode *code)
1097{ 1097{
1098 if ((unsigned int)index >= ARRAY_SIZE(ov772x_cfmts)) 1098 if (index >= ARRAY_SIZE(ov772x_cfmts))
1099 return -EINVAL; 1099 return -EINVAL;
1100 1100
1101 *code = ov772x_cfmts[index].code; 1101 *code = ov772x_cfmts[index].code;
@@ -1159,7 +1159,6 @@ static int ov772x_probe(struct i2c_client *client,
1159 ret = ov772x_video_probe(icd, client); 1159 ret = ov772x_video_probe(icd, client);
1160 if (ret) { 1160 if (ret) {
1161 icd->ops = NULL; 1161 icd->ops = NULL;
1162 i2c_set_clientdata(client, NULL);
1163 kfree(priv); 1162 kfree(priv);
1164 } 1163 }
1165 1164
@@ -1172,7 +1171,6 @@ static int ov772x_remove(struct i2c_client *client)
1172 struct soc_camera_device *icd = client->dev.platform_data; 1171 struct soc_camera_device *icd = client->dev.platform_data;
1173 1172
1174 icd->ops = NULL; 1173 icd->ops = NULL;
1175 i2c_set_clientdata(client, NULL);
1176 kfree(priv); 1174 kfree(priv);
1177 return 0; 1175 return 0;
1178} 1176}