[media] s5p-jpeg: Avoid -Wuninitialized warning in s5p_jpeg_parse_hdr
authorJacek Anaszewski <j.anaszewski@samsung.com>
Fri, 10 Oct 2014 08:46:49 +0000 (05:46 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 24 Oct 2014 11:36:59 +0000 (09:36 -0200)
Initialize components variable in order to avoid
the possibility of using it uninitialized.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/s5p-jpeg/jpeg-core.c

index ec7339e84b5732c4312fb53c5b0c901d35edf235..6fcc7f072acea885816d30c95068c77942b17fde 100644 (file)
@@ -893,7 +893,7 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
                               unsigned long buffer, unsigned long size,
                               struct s5p_jpeg_ctx *ctx)
 {
-       int c, components, notfound;
+       int c, components = 0, notfound;
        unsigned int height, width, word, subsampling = 0;
        long length;
        struct s5p_jpeg_buffer jpeg_buffer;