diff options
Diffstat (limited to 'drivers/media/video/mt9t112.c')
-rw-r--r-- | drivers/media/video/mt9t112.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c index 7438f8d775ba..e4bf1db9a87b 100644 --- a/drivers/media/video/mt9t112.c +++ b/drivers/media/video/mt9t112.c | |||
@@ -1017,10 +1017,10 @@ static int mt9t112_try_fmt(struct v4l2_subdev *sd, | |||
1017 | return 0; | 1017 | return 0; |
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | static int mt9t112_enum_fmt(struct v4l2_subdev *sd, int index, | 1020 | static int mt9t112_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
1021 | enum v4l2_mbus_pixelcode *code) | 1021 | enum v4l2_mbus_pixelcode *code) |
1022 | { | 1022 | { |
1023 | if ((unsigned int)index >= ARRAY_SIZE(mt9t112_cfmts)) | 1023 | if (index >= ARRAY_SIZE(mt9t112_cfmts)) |
1024 | return -EINVAL; | 1024 | return -EINVAL; |
1025 | 1025 | ||
1026 | *code = mt9t112_cfmts[index].code; | 1026 | *code = mt9t112_cfmts[index].code; |
@@ -1119,7 +1119,6 @@ static int mt9t112_probe(struct i2c_client *client, | |||
1119 | ret = mt9t112_camera_probe(icd, client); | 1119 | ret = mt9t112_camera_probe(icd, client); |
1120 | if (ret) { | 1120 | if (ret) { |
1121 | icd->ops = NULL; | 1121 | icd->ops = NULL; |
1122 | i2c_set_clientdata(client, NULL); | ||
1123 | kfree(priv); | 1122 | kfree(priv); |
1124 | } | 1123 | } |
1125 | 1124 | ||
@@ -1132,7 +1131,6 @@ static int mt9t112_remove(struct i2c_client *client) | |||
1132 | struct soc_camera_device *icd = client->dev.platform_data; | 1131 | struct soc_camera_device *icd = client->dev.platform_data; |
1133 | 1132 | ||
1134 | icd->ops = NULL; | 1133 | icd->ops = NULL; |
1135 | i2c_set_clientdata(client, NULL); | ||
1136 | kfree(priv); | 1134 | kfree(priv); |
1137 | return 0; | 1135 | return 0; |
1138 | } | 1136 | } |