Re: [PATCH] wifi: ath11k: fix resource leak on error in ext IRQ setup
kernel test robot <[email protected]> Thu, 6 Aug 2026 02:29:16 +0800
| Newsgroups | dev.linux.lists.oe-kbuild-all,org.infradead.lists.ath11k,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <[email protected]> |
Hi ZhaoJinming, kernel test robot noticed the following build errors: [auto build test ERROR on wireless/main] [also build test ERROR on wireless-next/main linus/master v7.2-rc6] [cannot apply to ath/ath-next next-20260805] [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/ZhaoJinming/wifi-ath11k-fix-resource-leak-on-error-in-ext-IRQ-setup/20260805-214821 base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git main patch link: https://lore.kernel.org/r/20260622025659.1235658-1-zhaojinming%40uniontech.com patch subject: [PATCH] wifi: ath11k: fix resource leak on error in ext IRQ setup config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20260806/[email protected]/config) compiler: alpha-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260806/[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/net/wireless/ath/ath11k/ahb.c: In function 'ath11k_ahb_config_ext_irq': >> drivers/net/wireless/ath/ath11k/ahb.c:615:17: error: 'irq_grp' undeclared (first use in this function) 615 | irq_grp = &ab->ext_irq_grp[i]; | ^~~~~~~ drivers/net/wireless/ath/ath11k/ahb.c:615:17: note: each undeclared identifier is reported only once for each function it appears in vim +/irq_grp +615 drivers/net/wireless/ath/ath11k/ahb.c 523 524 static int ath11k_ahb_config_ext_irq(struct ath11k_base *ab) 525 { 526 struct ath11k_hw_params *hw = &ab->hw_params; 527 int i, j; 528 int irq; 529 int ret; 530 531 for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) { 532 struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; 533 u32 num_irq = 0; 534 535 irq_grp->ab = ab; 536 irq_grp->grp_id = i; 537 538 irq_grp->napi_ndev = alloc_netdev_dummy(0); 539 if (!irq_grp->napi_ndev) { 540 irq_grp->num_irq = 0; 541 goto err_request_irq; 542 } 543 544 netif_napi_add(irq_grp->napi_ndev, &irq_grp->napi, 545 ath11k_ahb_ext_grp_napi_poll); 546 547 for (j = 0; j < ATH11K_EXT_IRQ_NUM_MAX; j++) { 548 if (ab->hw_params.ring_mask->tx[i] & BIT(j)) { 549 irq_grp->irqs[num_irq++] = 550 wbm2host_tx_completions_ring1 - j; 551 } 552 553 if (ab->hw_params.ring_mask->rx[i] & BIT(j)) { 554 irq_grp->irqs[num_irq++] = 555 reo2host_destination_ring1 - j; 556 } 557 558 if (ab->hw_params.ring_mask->rx_err[i] & BIT(j)) 559 irq_grp->irqs[num_irq++] = reo2host_exception; 560 561 if (ab->hw_params.ring_mask->rx_wbm_rel[i] & BIT(j)) 562 irq_grp->irqs[num_irq++] = wbm2host_rx_release; 563 564 if (ab->hw_params.ring_mask->reo_status[i] & BIT(j)) 565 irq_grp->irqs[num_irq++] = reo2host_status; 566 567 if (j < ab->hw_params.max_radios) { 568 if (ab->hw_params.ring_mask->rxdma2host[i] & BIT(j)) { 569 irq_grp->irqs[num_irq++] = 570 rxdma2host_destination_ring_mac1 - 571 ath11k_hw_get_mac_from_pdev_id(hw, j); 572 } 573 574 if (ab->hw_params.ring_mask->host2rxdma[i] & BIT(j)) { 575 irq_grp->irqs[num_irq++] = 576 host2rxdma_host_buf_ring_mac1 - 577 ath11k_hw_get_mac_from_pdev_id(hw, j); 578 } 579 580 if (ab->hw_params.ring_mask->rx_mon_status[i] & BIT(j)) { 581 irq_grp->irqs[num_irq++] = 582 ppdu_end_interrupts_mac1 - 583 ath11k_hw_get_mac_from_pdev_id(hw, j); 584 irq_grp->irqs[num_irq++] = 585 rxdma2host_monitor_status_ring_mac1 - 586 ath11k_hw_get_mac_from_pdev_id(hw, j); 587 } 588 } 589 } 590 irq_grp->num_irq = num_irq; 591 592 for (j = 0; j < irq_grp->num_irq; j++) { 593 int irq_idx = irq_grp->irqs[j]; 594 595 irq = platform_get_irq_byname(ab->pdev, 596 irq_name[irq_idx]); 597 ab->irq_num[irq_idx] = irq; 598 irq_set_status_flags(irq, IRQ_NOAUTOEN | IRQ_DISABLE_UNLAZY); 599 ret = request_irq(irq, ath11k_ahb_ext_interrupt_handler, 600 IRQF_TRIGGER_RISING, 601 irq_name[irq_idx], irq_grp); 602 if (ret) { 603 ath11k_err(ab, "failed request_irq for %d\n", 604 irq); 605 irq_grp->num_irq = j; 606 goto err_request_irq; 607 } 608 } 609 } 610 611 return 0; 612 613 err_request_irq: 614 for ( ; i >= 0; i--) { > 615 irq_grp = &ab->ext_irq_grp[i]; 616 for (j = irq_grp->num_irq - 1; j >= 0; j--) 617 free_irq(ab->irq_num[irq_grp->irqs[j]], irq_grp); 618 if (irq_grp->napi_ndev) { 619 netif_napi_del(&irq_grp->napi); 620 free_netdev(irq_grp->napi_ndev); 621 } 622 } 623 return ret; 624 } 625 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki