:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: Manual check reason: "low confidence static check warning: 
drivers/memory/ti-emif-pm.c:278:26: warning: use of uninitialized value 
'<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]"
:::::: 

BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Krzysztof Kozlowski <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   d895ec7938c431fe61a731939da76a6461bc6133
commit: 8e6a257a173378d0fb42d64865545286f1f84ef6 memory: ti-emif-pm: simplify 
platform_get_resource()
date:   4 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 4 months ago
config: arm-randconfig-c002-20220831 
(https://download.01.org/0day-ci/archive/20220904/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8e6a257a173378d0fb42d64865545286f1f84ef6
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8e6a257a173378d0fb42d64865545286f1f84ef6
        # save the config file
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross 
ARCH=arm KBUILD_USERCFLAGS='-fanalyzer -Wno-error' 

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

gcc_analyzer warnings: (new ones prefixed by >>)
   drivers/memory/ti-emif-pm.c: In function 'ti_emif_probe':
>> drivers/memory/ti-emif-pm.c:278:26: warning: use of uninitialized value 
>> '<unknown>' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
     278 |         struct resource *res;
         |                          ^~~
     'ti_emif_probe': event 1
       |
       |  278 |         struct resource *res;
       |      |                          ^~~
       |      |                          |
       |      |                          (1) use of uninitialized value 
'<unknown>' here
       |

vim +278 drivers/memory/ti-emif-pm.c

38853979e6dce84 Dave Gerlach        2018-06-26  274  
8428e5ad750d482 Dave Gerlach        2015-06-17  275  static int 
ti_emif_probe(struct platform_device *pdev)
8428e5ad750d482 Dave Gerlach        2015-06-17  276  {
8428e5ad750d482 Dave Gerlach        2015-06-17  277     int ret;
8428e5ad750d482 Dave Gerlach        2015-06-17 @278     struct resource *res;
8428e5ad750d482 Dave Gerlach        2015-06-17  279     struct device *dev = 
&pdev->dev;
8428e5ad750d482 Dave Gerlach        2015-06-17  280     const struct 
of_device_id *match;
8428e5ad750d482 Dave Gerlach        2015-06-17  281     struct ti_emif_data 
*emif_data;
8428e5ad750d482 Dave Gerlach        2015-06-17  282  
8428e5ad750d482 Dave Gerlach        2015-06-17  283     emif_data = 
devm_kzalloc(dev, sizeof(*emif_data), GFP_KERNEL);
8428e5ad750d482 Dave Gerlach        2015-06-17  284     if (!emif_data)
8428e5ad750d482 Dave Gerlach        2015-06-17  285             return -ENOMEM;
8428e5ad750d482 Dave Gerlach        2015-06-17  286  
8428e5ad750d482 Dave Gerlach        2015-06-17  287     match = 
of_match_device(ti_emif_of_match, &pdev->dev);
8428e5ad750d482 Dave Gerlach        2015-06-17  288     if (!match)
8428e5ad750d482 Dave Gerlach        2015-06-17  289             return -ENODEV;
8428e5ad750d482 Dave Gerlach        2015-06-17  290  
8428e5ad750d482 Dave Gerlach        2015-06-17  291     
emif_data->pm_data.ti_emif_sram_config = (unsigned long)match->data;
8428e5ad750d482 Dave Gerlach        2015-06-17  292  
8e6a257a173378d Krzysztof Kozlowski 2022-04-19  293     
emif_data->pm_data.ti_emif_base_addr_virt = 
devm_platform_get_and_ioremap_resource(pdev,
8e6a257a173378d Krzysztof Kozlowski 2022-04-19  294                             
                                                           0,
8e6a257a173378d Krzysztof Kozlowski 2022-04-19  295                             
                                                           &res);
8428e5ad750d482 Dave Gerlach        2015-06-17  296     if 
(IS_ERR(emif_data->pm_data.ti_emif_base_addr_virt)) {
8428e5ad750d482 Dave Gerlach        2015-06-17  297             ret = 
PTR_ERR(emif_data->pm_data.ti_emif_base_addr_virt);
8428e5ad750d482 Dave Gerlach        2015-06-17  298             return ret;
8428e5ad750d482 Dave Gerlach        2015-06-17  299     }
8428e5ad750d482 Dave Gerlach        2015-06-17  300  
8428e5ad750d482 Dave Gerlach        2015-06-17  301     
emif_data->pm_data.ti_emif_base_addr_phys = res->start;
8428e5ad750d482 Dave Gerlach        2015-06-17  302  
8428e5ad750d482 Dave Gerlach        2015-06-17  303     
ti_emif_configure_sr_delay(emif_data);
8428e5ad750d482 Dave Gerlach        2015-06-17  304  
8428e5ad750d482 Dave Gerlach        2015-06-17  305     ret = 
ti_emif_alloc_sram(dev, emif_data);
8428e5ad750d482 Dave Gerlach        2015-06-17  306     if (ret)
8428e5ad750d482 Dave Gerlach        2015-06-17  307             return ret;
8428e5ad750d482 Dave Gerlach        2015-06-17  308  
8428e5ad750d482 Dave Gerlach        2015-06-17  309     ret = 
ti_emif_push_sram(dev, emif_data);
8428e5ad750d482 Dave Gerlach        2015-06-17  310     if (ret)
8428e5ad750d482 Dave Gerlach        2015-06-17  311             goto 
fail_free_sram;
8428e5ad750d482 Dave Gerlach        2015-06-17  312  
8428e5ad750d482 Dave Gerlach        2015-06-17  313     emif_instance = 
emif_data;
8428e5ad750d482 Dave Gerlach        2015-06-17  314  
8428e5ad750d482 Dave Gerlach        2015-06-17  315     return 0;
8428e5ad750d482 Dave Gerlach        2015-06-17  316  
8428e5ad750d482 Dave Gerlach        2015-06-17  317  fail_free_sram:
8428e5ad750d482 Dave Gerlach        2015-06-17  318     
ti_emif_free_sram(emif_data);
8428e5ad750d482 Dave Gerlach        2015-06-17  319  
8428e5ad750d482 Dave Gerlach        2015-06-17  320     return ret;
8428e5ad750d482 Dave Gerlach        2015-06-17  321  }
8428e5ad750d482 Dave Gerlach        2015-06-17  322  

:::::: The code at line 278 was first introduced by commit
:::::: 8428e5ad750d482bdf077e81a1e9357332b3278c memory: ti-emif-sram: introduce 
relocatable suspend/resume handlers

:::::: TO: Dave Gerlach <[email protected]>
:::::: CC: Santosh Shilimkar <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to