CC: kbuild-...@lists.01.org CC: Linux Memory Management List <linux...@kvack.org> TO: Takashi Iwai <ti...@suse.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 90d856e71443a2fcacca8e7539bac44d9cb3f7ab commit: 8c5823ef31e1cb3bd1144bc6cefc9a234cfac7ba [1760/3296] ALSA: azt3328: Allocate resources with device-managed APIs :::::: branch date: 3 days ago :::::: commit date: 7 days ago config: x86_64-randconfig-m001-20210726 (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 <l...@intel.com> Reported-by: Dan Carpenter <dan.carpen...@oracle.com> smatch warnings: sound/pci/azt3328.c:2426 snd_azf3328_create() warn: 'pci' not released on lines: 2392. vim +/pci +2426 sound/pci/azt3328.c d91c64c8279501 Andreas Mohr 2005-10-25 2332 e23e7a14362072 Bill Pemberton 2012-12-06 2333 static int 95de77660bb54e Takashi Iwai 2005-11-17 2334 snd_azf3328_create(struct snd_card *card, ^1da177e4c3f41 Linus Torvalds 2005-04-16 2335 struct pci_dev *pci, 8c5823ef31e1cb Takashi Iwai 2021-07-15 2336 unsigned long device_type) ^1da177e4c3f41 Linus Torvalds 2005-04-16 2337 { 8c5823ef31e1cb Takashi Iwai 2021-07-15 2338 struct snd_azf3328 *chip = card->private_data; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2339 int err; dfbf9511155d35 Andreas Mohr 2009-07-05 2340 u8 dma_init; dfbf9511155d35 Andreas Mohr 2009-07-05 2341 enum snd_azf3328_codec_type codec_type; da237f35a8a503 Andreas Mohr 2010-12-27 2342 struct snd_azf3328_codec_data *codec_setup; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2343 8c5823ef31e1cb Takashi Iwai 2021-07-15 2344 err = pcim_enable_device(pci); 02330fbaaded5b Andreas Mohr 2008-05-16 2345 if (err < 0) ^1da177e4c3f41 Linus Torvalds 2005-04-16 2346 return err; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2347 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2348 spin_lock_init(&chip->reg_lock); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2349 chip->card = card; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2350 chip->pci = pci; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2351 chip->irq = -1; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2352 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2353 /* check if we can restrict PCI DMA transfers to 24 bits */ 669f65eaeb969e Takashi Iwai 2021-01-14 2354 if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(24))) { 4a8d9d717f9498 Takashi Iwai 2014-02-25 2355 dev_err(card->dev, 4a8d9d717f9498 Takashi Iwai 2014-02-25 2356 "architecture does not support 24bit PCI busmaster DMA\n" 02330fbaaded5b Andreas Mohr 2008-05-16 2357 ); 8c5823ef31e1cb Takashi Iwai 2021-07-15 2358 return -ENXIO; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2359 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 2360 02330fbaaded5b Andreas Mohr 2008-05-16 2361 err = pci_request_regions(pci, "Aztech AZF3328"); 02330fbaaded5b Andreas Mohr 2008-05-16 2362 if (err < 0) 8c5823ef31e1cb Takashi Iwai 2021-07-15 2363 return err; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2364 dfbf9511155d35 Andreas Mohr 2009-07-05 2365 chip->ctrl_io = pci_resource_start(pci, 0); 02330fbaaded5b Andreas Mohr 2008-05-16 2366 chip->game_io = pci_resource_start(pci, 1); 02330fbaaded5b Andreas Mohr 2008-05-16 2367 chip->mpu_io = pci_resource_start(pci, 2); 02330fbaaded5b Andreas Mohr 2008-05-16 2368 chip->opl3_io = pci_resource_start(pci, 3); 02330fbaaded5b Andreas Mohr 2008-05-16 2369 chip->mixer_io = pci_resource_start(pci, 4); 02330fbaaded5b Andreas Mohr 2008-05-16 2370 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2371 codec_setup = &chip->codecs[AZF_CODEC_PLAYBACK]; 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2372 codec_setup->io_base = chip->ctrl_io + AZF_IO_OFFS_CODEC_PLAYBACK; da237f35a8a503 Andreas Mohr 2010-12-27 2373 codec_setup->lock = &chip->reg_lock; da237f35a8a503 Andreas Mohr 2010-12-27 2374 codec_setup->type = AZF_CODEC_PLAYBACK; 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2375 codec_setup->name = "PLAYBACK"; 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2376 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2377 codec_setup = &chip->codecs[AZF_CODEC_CAPTURE]; 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2378 codec_setup->io_base = chip->ctrl_io + AZF_IO_OFFS_CODEC_CAPTURE; da237f35a8a503 Andreas Mohr 2010-12-27 2379 codec_setup->lock = &chip->reg_lock; da237f35a8a503 Andreas Mohr 2010-12-27 2380 codec_setup->type = AZF_CODEC_CAPTURE; 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2381 codec_setup->name = "CAPTURE"; 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2382 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2383 codec_setup = &chip->codecs[AZF_CODEC_I2S_OUT]; 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2384 codec_setup->io_base = chip->ctrl_io + AZF_IO_OFFS_CODEC_I2S_OUT; da237f35a8a503 Andreas Mohr 2010-12-27 2385 codec_setup->lock = &chip->reg_lock; da237f35a8a503 Andreas Mohr 2010-12-27 2386 codec_setup->type = AZF_CODEC_I2S_OUT; 9fd8d36caabaf3 Andreas Mohr 2010-12-27 2387 codec_setup->name = "I2S_OUT"; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2388 8c5823ef31e1cb Takashi Iwai 2021-07-15 2389 if (devm_request_irq(&pci->dev, pci->irq, snd_azf3328_interrupt, 934c2b6d0cb50f Takashi Iwai 2011-06-10 2390 IRQF_SHARED, KBUILD_MODNAME, chip)) { 4a8d9d717f9498 Takashi Iwai 2014-02-25 2391 dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); 8c5823ef31e1cb Takashi Iwai 2021-07-15 2392 return -EBUSY; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2393 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 2394 chip->irq = pci->irq; aefd1860acd553 Takashi Iwai 2019-12-10 2395 card->sync_irq = chip->irq; 8c5823ef31e1cb Takashi Iwai 2021-07-15 2396 card->private_free = snd_azf3328_free; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2397 pci_set_master(pci); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2398 d91c64c8279501 Andreas Mohr 2005-10-25 2399 snd_azf3328_debug_show_ports(chip); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2400 ^1da177e4c3f41 Linus Torvalds 2005-04-16 2401 /* create mixer interface & switches */ 02330fbaaded5b Andreas Mohr 2008-05-16 2402 err = snd_azf3328_mixer_new(chip); 02330fbaaded5b Andreas Mohr 2008-05-16 2403 if (err < 0) 8c5823ef31e1cb Takashi Iwai 2021-07-15 2404 return err; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2405 dfbf9511155d35 Andreas Mohr 2009-07-05 2406 /* standard codec init stuff */ dfbf9511155d35 Andreas Mohr 2009-07-05 2407 /* default DMA init value */ dfbf9511155d35 Andreas Mohr 2009-07-05 2408 dma_init = DMA_RUN_SOMETHING2|DMA_EPILOGUE_SOMETHING|DMA_SOMETHING_ELSE; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2409 dfbf9511155d35 Andreas Mohr 2009-07-05 2410 for (codec_type = AZF_CODEC_PLAYBACK; dfbf9511155d35 Andreas Mohr 2009-07-05 2411 codec_type <= AZF_CODEC_I2S_OUT; ++codec_type) { dfbf9511155d35 Andreas Mohr 2009-07-05 2412 struct snd_azf3328_codec_data *codec = dfbf9511155d35 Andreas Mohr 2009-07-05 2413 &chip->codecs[codec_type]; dfbf9511155d35 Andreas Mohr 2009-07-05 2414 adf5931f8c412e Andreas Mohr 2010-12-27 2415 /* shutdown codecs to reduce power / noise */ dfbf9511155d35 Andreas Mohr 2009-07-05 2416 /* have ...ctrl_codec_activity() act properly */ c237813e3a1039 Jiapeng Chong 2021-02-07 2417 codec->running = true; dfbf9511155d35 Andreas Mohr 2009-07-05 2418 snd_azf3328_ctrl_codec_activity(chip, codec_type, 0); ^1da177e4c3f41 Linus Torvalds 2005-04-16 2419 da237f35a8a503 Andreas Mohr 2010-12-27 2420 spin_lock_irq(codec->lock); dfbf9511155d35 Andreas Mohr 2009-07-05 2421 snd_azf3328_codec_outb(codec, IDX_IO_CODEC_DMA_FLAGS, dfbf9511155d35 Andreas Mohr 2009-07-05 2422 dma_init); da237f35a8a503 Andreas Mohr 2010-12-27 2423 spin_unlock_irq(codec->lock); dfbf9511155d35 Andreas Mohr 2009-07-05 2424 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 2425 8c5823ef31e1cb Takashi Iwai 2021-07-15 @2426 return 0; ^1da177e4c3f41 Linus Torvalds 2005-04-16 2427 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 2428 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org