Fix the following compilation warnings:

drivers/media/video/sr030pc30.c: In function ‘cam_i2c_write’:
drivers/media/video/sr030pc30.c:356: warning: ‘ret’ may be used uninitialized 
in this function
drivers/media/video/sr030pc30.c: In function ‘sr030pc30_set_params’:
drivers/media/video/sr030pc30.c:345: warning: ‘ret’ may be used uninitialized 
in this function
drivers/media/video/sr030pc30.c:328: note: ‘ret’ was declared here

Reported-by: Mauro Carvalho Chehab <mche...@redhat.com>
Signed-off-by: Sylwester Nawrocki <s.nawro...@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com>

---
Unfortunately I could not reproduce all the warnings in various build 
configurations,
this patch fixes the only issue I was able to find.
---
 drivers/media/video/sr030pc30.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/sr030pc30.c b/drivers/media/video/sr030pc30.c
index ec8d875..c9dc67a 100644
--- a/drivers/media/video/sr030pc30.c
+++ b/drivers/media/video/sr030pc30.c
@@ -326,7 +326,7 @@ static inline struct sr030pc30_info *to_sr030pc30(struct 
v4l2_subdev *sd)
 static inline int set_i2c_page(struct sr030pc30_info *info,
                               struct i2c_client *client, unsigned int reg)
 {
-       int ret;
+       int ret = 0;
        u32 page = reg >> 8 & 0xFF;
 
        if (info->i2c_reg_page != page && (reg & 0xFF) != 0x03) {
-- 
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to