CC: [email protected]
CC: [email protected]
TO: Takashi Iwai <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git 
topic/memalloc-noncontig
head:   aac54027424d36ebfff88350e5e4d99f310d4fce
commit: 8c5823ef31e1cb3bd1144bc6cefc9a234cfac7ba [20/146] ALSA: azt3328: 
Allocate resources with device-managed APIs
:::::: branch date: 13 hours ago
:::::: commit date: 3 weeks ago
config: microblaze-randconfig-m031-20210812 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 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]>

smatch warnings:
sound/pci/azt3328.c:2426 snd_azf3328_create() warn: 'pci' not released on 
lines: 2392.

vim +/pci +2426 sound/pci/azt3328.c

d91c64c8279501f Andreas Mohr   2005-10-25  2332  
e23e7a143620721 Bill Pemberton 2012-12-06  2333  static int
95de77660bb54e6 Takashi Iwai   2005-11-17  2334  snd_azf3328_create(struct 
snd_card *card,
^1da177e4c3f415 Linus Torvalds 2005-04-16  2335                    struct 
pci_dev *pci,
8c5823ef31e1cb3 Takashi Iwai   2021-07-15  2336                    unsigned 
long device_type)
^1da177e4c3f415 Linus Torvalds 2005-04-16  2337  {
8c5823ef31e1cb3 Takashi Iwai   2021-07-15  2338         struct snd_azf3328 
*chip = card->private_data;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2339         int err;
dfbf9511155d358 Andreas Mohr   2009-07-05  2340         u8 dma_init;
dfbf9511155d358 Andreas Mohr   2009-07-05  2341         enum 
snd_azf3328_codec_type codec_type;
da237f35a8a503f Andreas Mohr   2010-12-27  2342         struct 
snd_azf3328_codec_data *codec_setup;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2343  
8c5823ef31e1cb3 Takashi Iwai   2021-07-15  2344         err = 
pcim_enable_device(pci);
02330fbaaded5b6 Andreas Mohr   2008-05-16  2345         if (err < 0)
^1da177e4c3f415 Linus Torvalds 2005-04-16  2346                 return err;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2347  
^1da177e4c3f415 Linus Torvalds 2005-04-16  2348         
spin_lock_init(&chip->reg_lock);
^1da177e4c3f415 Linus Torvalds 2005-04-16  2349         chip->card = card;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2350         chip->pci = pci;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2351         chip->irq = -1;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2352  
^1da177e4c3f415 Linus Torvalds 2005-04-16  2353         /* check if we can 
restrict PCI DMA transfers to 24 bits */
669f65eaeb969ef Takashi Iwai   2021-01-14  2354         if 
(dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(24))) {
4a8d9d717f9498f Takashi Iwai   2014-02-25  2355                 
dev_err(card->dev,
4a8d9d717f9498f Takashi Iwai   2014-02-25  2356                         
"architecture does not support 24bit PCI busmaster DMA\n"
02330fbaaded5b6 Andreas Mohr   2008-05-16  2357                 );
8c5823ef31e1cb3 Takashi Iwai   2021-07-15  2358                 return -ENXIO;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2359         }
^1da177e4c3f415 Linus Torvalds 2005-04-16  2360  
02330fbaaded5b6 Andreas Mohr   2008-05-16  2361         err = 
pci_request_regions(pci, "Aztech AZF3328");
02330fbaaded5b6 Andreas Mohr   2008-05-16  2362         if (err < 0)
8c5823ef31e1cb3 Takashi Iwai   2021-07-15  2363                 return err;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2364  
dfbf9511155d358 Andreas Mohr   2009-07-05  2365         chip->ctrl_io  = 
pci_resource_start(pci, 0);
02330fbaaded5b6 Andreas Mohr   2008-05-16  2366         chip->game_io  = 
pci_resource_start(pci, 1);
02330fbaaded5b6 Andreas Mohr   2008-05-16  2367         chip->mpu_io   = 
pci_resource_start(pci, 2);
02330fbaaded5b6 Andreas Mohr   2008-05-16  2368         chip->opl3_io  = 
pci_resource_start(pci, 3);
02330fbaaded5b6 Andreas Mohr   2008-05-16  2369         chip->mixer_io = 
pci_resource_start(pci, 4);
02330fbaaded5b6 Andreas Mohr   2008-05-16  2370  
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2371         codec_setup = 
&chip->codecs[AZF_CODEC_PLAYBACK];
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2372         codec_setup->io_base = 
chip->ctrl_io + AZF_IO_OFFS_CODEC_PLAYBACK;
da237f35a8a503f Andreas Mohr   2010-12-27  2373         codec_setup->lock = 
&chip->reg_lock;
da237f35a8a503f Andreas Mohr   2010-12-27  2374         codec_setup->type = 
AZF_CODEC_PLAYBACK;
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2375         codec_setup->name = 
"PLAYBACK";
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2376  
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2377         codec_setup = 
&chip->codecs[AZF_CODEC_CAPTURE];
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2378         codec_setup->io_base = 
chip->ctrl_io + AZF_IO_OFFS_CODEC_CAPTURE;
da237f35a8a503f Andreas Mohr   2010-12-27  2379         codec_setup->lock = 
&chip->reg_lock;
da237f35a8a503f Andreas Mohr   2010-12-27  2380         codec_setup->type = 
AZF_CODEC_CAPTURE;
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2381         codec_setup->name = 
"CAPTURE";
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2382  
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2383         codec_setup = 
&chip->codecs[AZF_CODEC_I2S_OUT];
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2384         codec_setup->io_base = 
chip->ctrl_io + AZF_IO_OFFS_CODEC_I2S_OUT;
da237f35a8a503f Andreas Mohr   2010-12-27  2385         codec_setup->lock = 
&chip->reg_lock;
da237f35a8a503f Andreas Mohr   2010-12-27  2386         codec_setup->type = 
AZF_CODEC_I2S_OUT;
9fd8d36caabaf31 Andreas Mohr   2010-12-27  2387         codec_setup->name = 
"I2S_OUT";
^1da177e4c3f415 Linus Torvalds 2005-04-16  2388  
8c5823ef31e1cb3 Takashi Iwai   2021-07-15  2389         if 
(devm_request_irq(&pci->dev, pci->irq, snd_azf3328_interrupt,
934c2b6d0cb50f9 Takashi Iwai   2011-06-10  2390                              
IRQF_SHARED, KBUILD_MODNAME, chip)) {
4a8d9d717f9498f Takashi Iwai   2014-02-25  2391                 
dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
8c5823ef31e1cb3 Takashi Iwai   2021-07-15  2392                 return -EBUSY;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2393         }
^1da177e4c3f415 Linus Torvalds 2005-04-16  2394         chip->irq = pci->irq;
aefd1860acd553e Takashi Iwai   2019-12-10  2395         card->sync_irq = 
chip->irq;
8c5823ef31e1cb3 Takashi Iwai   2021-07-15  2396         card->private_free = 
snd_azf3328_free;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2397         pci_set_master(pci);
^1da177e4c3f415 Linus Torvalds 2005-04-16  2398  
d91c64c8279501f Andreas Mohr   2005-10-25  2399         
snd_azf3328_debug_show_ports(chip);
^1da177e4c3f415 Linus Torvalds 2005-04-16  2400  
^1da177e4c3f415 Linus Torvalds 2005-04-16  2401         /* create mixer 
interface & switches */
02330fbaaded5b6 Andreas Mohr   2008-05-16  2402         err = 
snd_azf3328_mixer_new(chip);
02330fbaaded5b6 Andreas Mohr   2008-05-16  2403         if (err < 0)
8c5823ef31e1cb3 Takashi Iwai   2021-07-15  2404                 return err;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2405  
dfbf9511155d358 Andreas Mohr   2009-07-05  2406         /* standard codec init 
stuff */
dfbf9511155d358 Andreas Mohr   2009-07-05  2407                 /* default DMA 
init value */
dfbf9511155d358 Andreas Mohr   2009-07-05  2408         dma_init = 
DMA_RUN_SOMETHING2|DMA_EPILOGUE_SOMETHING|DMA_SOMETHING_ELSE;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2409  
dfbf9511155d358 Andreas Mohr   2009-07-05  2410         for (codec_type = 
AZF_CODEC_PLAYBACK;
dfbf9511155d358 Andreas Mohr   2009-07-05  2411                 codec_type <= 
AZF_CODEC_I2S_OUT; ++codec_type) {
dfbf9511155d358 Andreas Mohr   2009-07-05  2412                 struct 
snd_azf3328_codec_data *codec =
dfbf9511155d358 Andreas Mohr   2009-07-05  2413                          
&chip->codecs[codec_type];
dfbf9511155d358 Andreas Mohr   2009-07-05  2414  
adf5931f8c412e9 Andreas Mohr   2010-12-27  2415                 /* shutdown 
codecs to reduce power / noise */
dfbf9511155d358 Andreas Mohr   2009-07-05  2416                         /* have 
...ctrl_codec_activity() act properly */
c237813e3a10393 Jiapeng Chong  2021-02-07  2417                 codec->running 
= true;
dfbf9511155d358 Andreas Mohr   2009-07-05  2418                 
snd_azf3328_ctrl_codec_activity(chip, codec_type, 0);
^1da177e4c3f415 Linus Torvalds 2005-04-16  2419  
da237f35a8a503f Andreas Mohr   2010-12-27  2420                 
spin_lock_irq(codec->lock);
dfbf9511155d358 Andreas Mohr   2009-07-05  2421                 
snd_azf3328_codec_outb(codec, IDX_IO_CODEC_DMA_FLAGS,
dfbf9511155d358 Andreas Mohr   2009-07-05  2422                                 
                 dma_init);
da237f35a8a503f Andreas Mohr   2010-12-27  2423                 
spin_unlock_irq(codec->lock);
dfbf9511155d358 Andreas Mohr   2009-07-05  2424         }
^1da177e4c3f415 Linus Torvalds 2005-04-16  2425  
8c5823ef31e1cb3 Takashi Iwai   2021-07-15 @2426         return 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16  2427  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  2428  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to