linux_dsm_epyc7002/sound/pci/asihpi
Tom Rix 472eb39103 ALSA: asihpi: fix iounmap in error handler
clang static analysis flags this problem
hpioctl.c:513:7: warning: Branch condition evaluates to
  a garbage value
                if (pci.ap_mem_base[idx]) {
                    ^~~~~~~~~~~~~~~~~~~~

If there is a failure in the middle of the memory space loop,
only some of the memory spaces need to be cleaned up.

At the error handler, idx holds the number of successful
memory spaces mapped.  So rework the handler loop to use the
old idx.

There is a second problem, the memory space loop conditionally
iomaps()/sets the mem_base so it is necessay to initize pci.

Fixes: 719f82d398 ("ALSA: Add support of AudioScience ASI boards")
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20200913165230.17166-1-trix@redhat.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-09-21 10:22:57 +02:00
..
asihpi.c ALSA: pci/asihpi: convert tasklets to use new tasklet_setup() API 2020-09-02 13:25:06 +02:00
hpi6000.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpi6000.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpi6205.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpi6205.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpi_internal.h ALSA: asihpi: delete duplicated word 2020-07-19 20:50:47 +02:00
hpi_version.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hpi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpicmn.c ALSA: pci/asihpi: fix kernel-doc 2020-07-07 12:03:17 +02:00
hpicmn.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpidebug.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpidebug.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpidspcd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpidspcd.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpifunc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hpimsginit.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpimsginit.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpimsgx.c ALSA: asihpi: More constifications 2020-01-05 16:14:53 +01:00
hpimsgx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpioctl.c ALSA: asihpi: fix iounmap in error handler 2020-09-21 10:22:57 +02:00
hpioctl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpios.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpios.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
hpipcida.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 273 2019-06-05 17:30:30 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00