aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov9640.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ov9640.c')
-rw-r--r--drivers/media/video/ov9640.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/ov9640.c b/drivers/media/video/ov9640.c
index 36599a65f548..7ce9e05b4781 100644
--- a/drivers/media/video/ov9640.c
+++ b/drivers/media/video/ov9640.c
@@ -614,10 +614,10 @@ static int ov9640_try_fmt(struct v4l2_subdev *sd,
614 return 0; 614 return 0;
615} 615}
616 616
617static int ov9640_enum_fmt(struct v4l2_subdev *sd, int index, 617static int ov9640_enum_fmt(struct v4l2_subdev *sd, unsigned int index,
618 enum v4l2_mbus_pixelcode *code) 618 enum v4l2_mbus_pixelcode *code)
619{ 619{
620 if ((unsigned int)index >= ARRAY_SIZE(ov9640_codes)) 620 if (index >= ARRAY_SIZE(ov9640_codes))
621 return -EINVAL; 621 return -EINVAL;
622 622
623 *code = ov9640_codes[index]; 623 *code = ov9640_codes[index];
@@ -783,7 +783,6 @@ static int ov9640_probe(struct i2c_client *client,
783 783
784 if (ret) { 784 if (ret) {
785 icd->ops = NULL; 785 icd->ops = NULL;
786 i2c_set_clientdata(client, NULL);
787 kfree(priv); 786 kfree(priv);
788 } 787 }
789 788
@@ -794,7 +793,6 @@ static int ov9640_remove(struct i2c_client *client)
794{ 793{
795 struct ov9640_priv *priv = i2c_get_clientdata(client); 794 struct ov9640_priv *priv = i2c_get_clientdata(client);
796 795
797 i2c_set_clientdata(client, NULL);
798 kfree(priv); 796 kfree(priv);
799 return 0; 797 return 0;
800} 798}