mediatek: fit: fix use of uninitialized variable
authorQingfang Deng <qingfang.deng@siflower.com.cn>
Fri, 28 Jun 2024 09:01:00 +0000 (17:01 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Sun, 7 Jul 2024 12:59:48 +0000 (20:59 +0800)
commit2ded54972e5acb6df8c323a173a4d8ff27f9f1a0
tree0e9528285cddd193c90bc9810d93f04d3bc77ae9
parent7117ebab0bc681aa6657202dd44c6b562335901b
mediatek: fit: fix use of uninitialized variable

When building the kernel with -Wmaybe-uninitialized, GCC reports this
warning:

block/partitions/fit.c: In function 'parse_fit_partitions':
block/partitions/fit.c:164:3: warning: 'images' may be used uninitialized in this function [-Wmaybe-uninitialized]
  164 |   printk(KERN_ERR "FIT: Cannot find %s node: %d\n", FIT_CONFS_PATH, images);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It appears to be a copy paste error. It's the "config" variable that is
supposed to be printed.

Fixes: e6aac8d98f56 ("image: add support for building FIT image with filesystem")
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
target/linux/mediatek/files/block/partitions/fit.c