Hi Wentao,

kernel test robot noticed the following build errors:

[auto build test ERROR on daeinki-drm-exynos/exynos-drm-next]
[also build test ERROR on drm/drm-next drm-i915/for-linux-next 
drm-i915/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip 
linus/master rmk-arm/drm-armada-devel v7.1-rc3 next-20260508]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Wentao-Liang/drm-armada-fix-device_node-reference-leak-in-armada_lcd_bind/20260512-194755
base:   https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git 
exynos-drm-next
patch link:    
https://lore.kernel.org/r/20260509091821.963513-1-vulab%40iscas.ac.cn
patch subject: [PATCH] drm/armada: fix device_node reference leak in 
armada_lcd_bind()
config: arm-randconfig-003-20260512 
(https://download.01.org/0day-ci/archive/20260513/[email protected]/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 
5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20260513/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/armada/armada_crtc.c:1039:2: error: use of undeclared 
>> identifier 'ret'; did you mean 'res'?
    1039 |         ret = armada_drm_crtc_create(drm, dev, res, irq, variant, 
port);
         |         ^~~
         |         res
   drivers/gpu/drm/armada/armada_crtc.c:1013:19: note: 'res' declared here
    1013 |         struct resource *res = platform_get_resource(pdev, 
IORESOURCE_MEM, 0);
         |                          ^
>> drivers/gpu/drm/armada/armada_crtc.c:1039:6: error: incompatible integer to 
>> pointer conversion assigning to 'struct resource *' from 'int' 
>> [-Wint-conversion]
    1039 |         ret = armada_drm_crtc_create(drm, dev, res, irq, variant, 
port);
         |             ^ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/armada/armada_crtc.c:1040:6: error: use of undeclared 
identifier 'ret'; did you mean 'res'?
    1040 |         if (ret)
         |             ^~~
         |             res
   drivers/gpu/drm/armada/armada_crtc.c:1013:19: note: 'res' declared here
    1013 |         struct resource *res = platform_get_resource(pdev, 
IORESOURCE_MEM, 0);
         |                          ^
   drivers/gpu/drm/armada/armada_crtc.c:1042:9: error: use of undeclared 
identifier 'ret'; did you mean 'res'?
    1042 |         return ret;
         |                ^~~
         |                res
   drivers/gpu/drm/armada/armada_crtc.c:1013:19: note: 'res' declared here
    1013 |         struct resource *res = platform_get_resource(pdev, 
IORESOURCE_MEM, 0);
         |                          ^
>> drivers/gpu/drm/armada/armada_crtc.c:1042:9: error: incompatible pointer to 
>> integer conversion returning 'struct resource *' from a function with result 
>> type 'int' [-Wint-conversion]
    1042 |         return ret;
         |                ^~~
   5 errors generated.


vim +1039 drivers/gpu/drm/armada/armada_crtc.c

  1007  
  1008  static int
  1009  armada_lcd_bind(struct device *dev, struct device *master, void *data)
  1010  {
  1011          struct platform_device *pdev = to_platform_device(dev);
  1012          struct drm_device *drm = data;
  1013          struct resource *res = platform_get_resource(pdev, 
IORESOURCE_MEM, 0);
  1014          int irq = platform_get_irq(pdev, 0);
  1015          const struct armada_variant *variant;
  1016          struct device_node *port = NULL;
  1017          struct device_node *np, *parent = dev->of_node;
  1018  
  1019          if (irq < 0)
  1020                  return irq;
  1021  
  1022  
  1023          variant = device_get_match_data(dev);
  1024          if (!variant)
  1025                  return -ENXIO;
  1026  
  1027          if (parent) {
  1028                  np = of_get_child_by_name(parent, "ports");
  1029                  if (np)
  1030                          parent = np;
  1031                  port = of_get_child_by_name(parent, "port");
  1032                  of_node_put(np);
  1033                  if (!port) {
  1034                          dev_err(dev, "no port node found in %pOF\n", 
parent);
  1035                          return -ENXIO;
  1036                  }
  1037          }
  1038  
> 1039          ret = armada_drm_crtc_create(drm, dev, res, irq, variant, port);
  1040          if (ret)
  1041                  of_node_put(port);
> 1042          return ret;
  1043  }
  1044  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to