• Mauro Carvalho Chehab's avatar
    [media] s5p-jpeg: don't return a random width/height · a16e3772
    Mauro Carvalho Chehab authored
    Gcc 7.1 complains about:
    
    drivers/media/platform/s5p-jpeg/jpeg-core.c: In function 's5p_jpeg_parse_hdr.isra.9':
    drivers/media/platform/s5p-jpeg/jpeg-core.c:1207:12: warning: 'width' may be used uninitialized in this function [-Wmaybe-uninitialized]
      result->w = width;
      ~~~~~~~~~~^~~~~~~
    drivers/media/platform/s5p-jpeg/jpeg-core.c:1208:12: warning: 'height' may be used uninitialized in this function [-Wmaybe-uninitialized]
      result->h = height;
      ~~~~~~~~~~^~~~~~~~
    
    Indeed the code would allow it to return a random value (although
    it shouldn't happen, in practice). So, explicitly set both to zero,
    just in case.
    Acked-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
    a16e3772
jpeg-core.c 81.7 KB