CC: [email protected] CC: Linux Memory Management List <[email protected]> TO: Takashi Iwai <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 90d856e71443a2fcacca8e7539bac44d9cb3f7ab commit: 21a9314cf93bfe9f77e2e019c272d15d58504670 [1758/3296] ALSA: als300: Allocate resources with device-managed APIs :::::: branch date: 32 hours ago :::::: commit date: 5 days ago config: x86_64-randconfig-m001-20210724 (attached as .config) compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> New smatch warnings: sound/pci/als300.c:654 snd_als300_create() warn: 'pci' not released on lines: 634. Old smatch warnings: sound/pci/als300.c:713 snd_als300_probe() error: potentially dereferencing uninitialized 'chip'. vim +/pci +654 sound/pci/als300.c b3a70d5ece6068 Ash Willis 2006-03-27 596 e23e7a14362072 Bill Pemberton 2012-12-06 597 static int snd_als300_create(struct snd_card *card, 21a9314cf93bfe Takashi Iwai 2021-07-15 598 struct pci_dev *pci, int chip_type) b3a70d5ece6068 Ash Willis 2006-03-27 599 { 21a9314cf93bfe Takashi Iwai 2021-07-15 600 struct snd_als300 *chip = card->private_data; b3a70d5ece6068 Ash Willis 2006-03-27 601 void *irq_handler; b3a70d5ece6068 Ash Willis 2006-03-27 602 int err; b3a70d5ece6068 Ash Willis 2006-03-27 603 21a9314cf93bfe Takashi Iwai 2021-07-15 604 err = pcim_enable_device(pci); 5bd11527e31fe4 Takashi Iwai 2021-06-08 605 if (err < 0) b3a70d5ece6068 Ash Willis 2006-03-27 606 return err; b3a70d5ece6068 Ash Willis 2006-03-27 607 669f65eaeb969e Takashi Iwai 2021-01-14 608 if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(28))) { c778f7ec745351 Takashi Iwai 2014-02-25 609 dev_err(card->dev, "error setting 28bit DMA mask\n"); b3a70d5ece6068 Ash Willis 2006-03-27 610 return -ENXIO; b3a70d5ece6068 Ash Willis 2006-03-27 611 } b3a70d5ece6068 Ash Willis 2006-03-27 612 pci_set_master(pci); b3a70d5ece6068 Ash Willis 2006-03-27 613 b3a70d5ece6068 Ash Willis 2006-03-27 614 chip->card = card; b3a70d5ece6068 Ash Willis 2006-03-27 615 chip->pci = pci; b3a70d5ece6068 Ash Willis 2006-03-27 616 chip->irq = -1; b3a70d5ece6068 Ash Willis 2006-03-27 617 chip->chip_type = chip_type; b3a70d5ece6068 Ash Willis 2006-03-27 618 spin_lock_init(&chip->reg_lock); b3a70d5ece6068 Ash Willis 2006-03-27 619 5bd11527e31fe4 Takashi Iwai 2021-06-08 620 err = pci_request_regions(pci, "ALS300"); 21a9314cf93bfe Takashi Iwai 2021-07-15 621 if (err < 0) b3a70d5ece6068 Ash Willis 2006-03-27 622 return err; 21a9314cf93bfe Takashi Iwai 2021-07-15 623 b3a70d5ece6068 Ash Willis 2006-03-27 624 chip->port = pci_resource_start(pci, 0); b3a70d5ece6068 Ash Willis 2006-03-27 625 b3a70d5ece6068 Ash Willis 2006-03-27 626 if (chip->chip_type == DEVICE_ALS300_PLUS) b3a70d5ece6068 Ash Willis 2006-03-27 627 irq_handler = snd_als300plus_interrupt; b3a70d5ece6068 Ash Willis 2006-03-27 628 else b3a70d5ece6068 Ash Willis 2006-03-27 629 irq_handler = snd_als300_interrupt; b3a70d5ece6068 Ash Willis 2006-03-27 630 21a9314cf93bfe Takashi Iwai 2021-07-15 631 if (devm_request_irq(&pci->dev, pci->irq, irq_handler, IRQF_SHARED, 934c2b6d0cb50f Takashi Iwai 2011-06-10 632 KBUILD_MODNAME, chip)) { c778f7ec745351 Takashi Iwai 2014-02-25 633 dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); b3a70d5ece6068 Ash Willis 2006-03-27 634 return -EBUSY; b3a70d5ece6068 Ash Willis 2006-03-27 635 } b3a70d5ece6068 Ash Willis 2006-03-27 636 chip->irq = pci->irq; ea2eab50a0e1a8 Takashi Iwai 2019-12-10 637 card->sync_irq = chip->irq; 21a9314cf93bfe Takashi Iwai 2021-07-15 638 card->private_free = snd_als300_free; b3a70d5ece6068 Ash Willis 2006-03-27 639 b3a70d5ece6068 Ash Willis 2006-03-27 640 snd_als300_init(chip); b3a70d5ece6068 Ash Willis 2006-03-27 641 65ff2357a7e40b Ash Willis 2007-05-29 642 err = snd_als300_ac97(chip); 65ff2357a7e40b Ash Willis 2007-05-29 643 if (err < 0) { c778f7ec745351 Takashi Iwai 2014-02-25 644 dev_err(card->dev, "Could not create ac97\n"); b3a70d5ece6068 Ash Willis 2006-03-27 645 return err; b3a70d5ece6068 Ash Willis 2006-03-27 646 } b3a70d5ece6068 Ash Willis 2006-03-27 647 5bd11527e31fe4 Takashi Iwai 2021-06-08 648 err = snd_als300_new_pcm(chip); 5bd11527e31fe4 Takashi Iwai 2021-06-08 649 if (err < 0) { c778f7ec745351 Takashi Iwai 2014-02-25 650 dev_err(card->dev, "Could not create PCM\n"); b3a70d5ece6068 Ash Willis 2006-03-27 651 return err; b3a70d5ece6068 Ash Willis 2006-03-27 652 } b3a70d5ece6068 Ash Willis 2006-03-27 653 b3a70d5ece6068 Ash Willis 2006-03-27 @654 return 0; b3a70d5ece6068 Ash Willis 2006-03-27 655 } b3a70d5ece6068 Ash Willis 2006-03-27 656 :::::: The code at line 654 was first introduced by commit :::::: b3a70d5ece60684c00d7d94ccc42741efdf99336 [ALSA] Add snd-als300 driver for Avance Logic ALS300/ALS300+ soundcards :::::: TO: Ash Willis <[email protected]> :::::: CC: Jaroslav Kysela <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
