Skip to contentSkip to conversation

s5p-jpeg: Avoid -Wuninitialized warning in s5p_jpeg_parse_hdr

PATCH New Jacek Anaszewski 1 participant 1 message Oct 10, 2014 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s5p-jpeg: Avoid -Wuninitialized warning in s5p_jpeg_parse_hdr

Initialize components variable in order to avoid
the possibility of using it uninitialized.

---
 drivers/media/platform/s5p-jpeg/jpeg-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/s5p-jpeg/jpeg-core.c +1 -1
index e66acbc..91dc351 100644
@@ -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;
Signature · 1 line
1.7.9.5