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: 6f16c19b115eb6564da7ea882af2afee4e26c213 [1790/3296] ALSA: lx6464es: Allocate resources with device-managed APIs :::::: branch date: 34 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]> smatch warnings: sound/pci/lx6464es/lx6464es.c:993 snd_lx6464es_create() warn: 'pci' not released on lines: 956,961. vim +/pci +993 sound/pci/lx6464es/lx6464es.c 02bec490450836 Tim Blechmann 2009-03-24 912 02bec490450836 Tim Blechmann 2009-03-24 913 e23e7a14362072 Bill Pemberton 2012-12-06 914 static int snd_lx6464es_create(struct snd_card *card, 6f16c19b115eb6 Takashi Iwai 2021-07-15 915 struct pci_dev *pci) 02bec490450836 Tim Blechmann 2009-03-24 916 { 6f16c19b115eb6 Takashi Iwai 2021-07-15 917 struct lx6464es *chip = card->private_data; 02bec490450836 Tim Blechmann 2009-03-24 918 int err; 02bec490450836 Tim Blechmann 2009-03-24 919 be4e6d3c0fa03d Takashi Iwai 2014-02-25 920 dev_dbg(card->dev, "->snd_lx6464es_create\n"); 02bec490450836 Tim Blechmann 2009-03-24 921 02bec490450836 Tim Blechmann 2009-03-24 922 /* enable PCI device */ 6f16c19b115eb6 Takashi Iwai 2021-07-15 923 err = pcim_enable_device(pci); 02bec490450836 Tim Blechmann 2009-03-24 924 if (err < 0) 02bec490450836 Tim Blechmann 2009-03-24 925 return err; 02bec490450836 Tim Blechmann 2009-03-24 926 02bec490450836 Tim Blechmann 2009-03-24 927 pci_set_master(pci); 02bec490450836 Tim Blechmann 2009-03-24 928 02bec490450836 Tim Blechmann 2009-03-24 929 /* check if we can restrict PCI DMA transfers to 32 bits */ 412b979ccceff4 Quentin Lambert 2015-04-15 930 err = dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); 02bec490450836 Tim Blechmann 2009-03-24 931 if (err < 0) { be4e6d3c0fa03d Takashi Iwai 2014-02-25 932 dev_err(card->dev, be4e6d3c0fa03d Takashi Iwai 2014-02-25 933 "architecture does not support 32bit PCI busmaster DMA\n"); 02bec490450836 Tim Blechmann 2009-03-24 934 return -ENXIO; 02bec490450836 Tim Blechmann 2009-03-24 935 } 02bec490450836 Tim Blechmann 2009-03-24 936 02bec490450836 Tim Blechmann 2009-03-24 937 chip->card = card; 02bec490450836 Tim Blechmann 2009-03-24 938 chip->pci = pci; 02bec490450836 Tim Blechmann 2009-03-24 939 chip->irq = -1; 02bec490450836 Tim Blechmann 2009-03-24 940 02bec490450836 Tim Blechmann 2009-03-24 941 /* initialize synchronization structs */ 6336c20cdaee1d Takashi Iwai 2014-09-10 942 mutex_init(&chip->lock); 6336c20cdaee1d Takashi Iwai 2014-09-10 943 mutex_init(&chip->msg_lock); 02bec490450836 Tim Blechmann 2009-03-24 944 mutex_init(&chip->setup_mutex); 02bec490450836 Tim Blechmann 2009-03-24 945 02bec490450836 Tim Blechmann 2009-03-24 946 /* request resources */ 02bec490450836 Tim Blechmann 2009-03-24 947 err = pci_request_regions(pci, card_name); 02bec490450836 Tim Blechmann 2009-03-24 948 if (err < 0) 6f16c19b115eb6 Takashi Iwai 2021-07-15 949 return err; 02bec490450836 Tim Blechmann 2009-03-24 950 02bec490450836 Tim Blechmann 2009-03-24 951 /* plx port */ 02bec490450836 Tim Blechmann 2009-03-24 952 chip->port_plx = pci_resource_start(pci, 1); 6f16c19b115eb6 Takashi Iwai 2021-07-15 953 chip->port_plx_remapped = devm_ioport_map(&pci->dev, chip->port_plx, 02bec490450836 Tim Blechmann 2009-03-24 954 pci_resource_len(pci, 1)); 6f16c19b115eb6 Takashi Iwai 2021-07-15 955 if (!chip->port_plx_remapped) 6f16c19b115eb6 Takashi Iwai 2021-07-15 956 return -ENOMEM; 02bec490450836 Tim Blechmann 2009-03-24 957 02bec490450836 Tim Blechmann 2009-03-24 958 /* dsp port */ 6f16c19b115eb6 Takashi Iwai 2021-07-15 959 chip->port_dsp_bar = pcim_iomap(pci, 2, 0); 6f16c19b115eb6 Takashi Iwai 2021-07-15 960 if (!chip->port_dsp_bar) 6f16c19b115eb6 Takashi Iwai 2021-07-15 961 return -ENOMEM; 02bec490450836 Tim Blechmann 2009-03-24 962 6f16c19b115eb6 Takashi Iwai 2021-07-15 963 err = devm_request_threaded_irq(&pci->dev, pci->irq, lx_interrupt, 6f16c19b115eb6 Takashi Iwai 2021-07-15 964 lx_threaded_irq, IRQF_SHARED, 6f16c19b115eb6 Takashi Iwai 2021-07-15 965 KBUILD_MODNAME, chip); 02bec490450836 Tim Blechmann 2009-03-24 966 if (err) { be4e6d3c0fa03d Takashi Iwai 2014-02-25 967 dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); 6f16c19b115eb6 Takashi Iwai 2021-07-15 968 return err; 02bec490450836 Tim Blechmann 2009-03-24 969 } 02bec490450836 Tim Blechmann 2009-03-24 970 chip->irq = pci->irq; 41094b243e621f Takashi Iwai 2019-12-10 971 card->sync_irq = chip->irq; 6f16c19b115eb6 Takashi Iwai 2021-07-15 972 card->private_free = snd_lx6464es_free; 02bec490450836 Tim Blechmann 2009-03-24 973 02bec490450836 Tim Blechmann 2009-03-24 974 err = lx_init_dsp(chip); 02bec490450836 Tim Blechmann 2009-03-24 975 if (err < 0) { be4e6d3c0fa03d Takashi Iwai 2014-02-25 976 dev_err(card->dev, "error during DSP initialization\n"); 02bec490450836 Tim Blechmann 2009-03-24 977 return err; 02bec490450836 Tim Blechmann 2009-03-24 978 } 02bec490450836 Tim Blechmann 2009-03-24 979 02bec490450836 Tim Blechmann 2009-03-24 980 err = lx_pcm_create(chip); 02bec490450836 Tim Blechmann 2009-03-24 981 if (err < 0) 02bec490450836 Tim Blechmann 2009-03-24 982 return err; 02bec490450836 Tim Blechmann 2009-03-24 983 02bec490450836 Tim Blechmann 2009-03-24 984 err = lx_proc_create(card, chip); 02bec490450836 Tim Blechmann 2009-03-24 985 if (err < 0) 02bec490450836 Tim Blechmann 2009-03-24 986 return err; 02bec490450836 Tim Blechmann 2009-03-24 987 02bec490450836 Tim Blechmann 2009-03-24 988 err = snd_ctl_add(card, snd_ctl_new1(&lx_control_playback_switch, 02bec490450836 Tim Blechmann 2009-03-24 989 chip)); 02bec490450836 Tim Blechmann 2009-03-24 990 if (err < 0) 02bec490450836 Tim Blechmann 2009-03-24 991 return err; 02bec490450836 Tim Blechmann 2009-03-24 992 02bec490450836 Tim Blechmann 2009-03-24 @993 return 0; 02bec490450836 Tim Blechmann 2009-03-24 994 } 02bec490450836 Tim Blechmann 2009-03-24 995 :::::: The code at line 993 was first introduced by commit :::::: 02bec490450836ebbd628e97ec03f10b57def8ce ALSA: lx6464es - driver for the digigram lx6464es interface :::::: TO: Tim Blechmann <[email protected]> :::::: CC: Takashi Iwai <[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]
