summaryrefslogtreecommitdiffstats
path: root/sound/isa
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: cs4236: fix an incorrect NULL check on list iteratorXiaomeng Tong2022-03-271-3/+5
| | | | | | | | | | | | | | | | | | | | | The bug is here: err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev); The list iterator value 'cdev' will *always* be set and non-NULL by list_for_each_entry(), so it is incorrect to assume that the iterator value will be NULL if the list is empty or no element is found. To fix the bug, use a new variable 'iter' as the list iterator, while use the original variable 'cdev' as a dedicated pointer to point to the found element. And snd_card_cs423x_pnp() itself has NULL check for cdev. Cc: stable@vger.kernel.org Fixes: c2b73d1458014 ("ALSA: cs4236: cs4232 and cs4236 driver merge to solve PnP BIOS detection") Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com> Link: https://lore.kernel.org/r/20220327060822.4735-1-xiam0nd.tong@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: gus: Fix memory leaks at memory allocator error pathsTakashi Iwai2021-12-131-12/+12
| | | | | | | | | | | | | | When snd_gf1_mem_xalloc() returns NULL, the current code still leaves the formerly allocated block.name string but returns an error immediately. This patch does code-refactoring to move the kstrdup() call itself into snd_gf1_mem_xalloc() and deals with the resource free in the helper code by itself for fixing those memory leaks. Suggested-by: Jaroslav Kysela <perex@perex.cz> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20211213132444.22385-2-tiwai@suse.de Link: https://lore.kernel.org/r/20211213141512.27359-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: gus: Fix erroneous memory allocationTakashi Iwai2021-12-131-1/+1
| | | | | | | | | | snd_gf1_mem_xalloc() returns NULL incorrectly when the memory chunk is allocated in the middle of the chain. This patch corrects the return value to treat it properly. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20211213132444.22385-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sound/isa/gus: check the return value of kstrdup()Xiaoke Wang2021-12-131-2/+6
| | | | | | | | | | kstrdup() returns NULL when some internal memory errors happen, it is better to check the return value of it. Otherwise, we may not to be able to catch some memory errors in time. Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Link: https://lore.kernel.org/r/tencent_1E3950293AC22395ACFE99404C985D738309@qq.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: gus: fix null pointer dereference on pointer blockChengfeng Ye2021-10-261-0/+2
| | | | | | | | | | The pointer block return from snd_gf1_dma_next_block could be null, so there is a potential null pointer dereference issue. Fix this by adding a null check before dereference. Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk> Link: https://lore.kernel.org/r/20211024104611.9919-1-cyeaa@connect.ust.hk Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ISA: not for M68KRandy Dunlap2021-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On m68k, compiling drivers under SND_ISA causes build errors: ../sound/core/isadma.c: In function 'snd_dma_program': ../sound/core/isadma.c:33:17: error: implicit declaration of function 'claim_dma_lock' [-Werror=implicit-function-declaration] 33 | flags = claim_dma_lock(); | ^~~~~~~~~~~~~~ ../sound/core/isadma.c:41:9: error: implicit declaration of function 'release_dma_lock' [-Werror=implicit-function-declaration] 41 | release_dma_lock(flags); | ^~~~~~~~~~~~~~~~ ../sound/isa/sb/sb16_main.c: In function 'snd_sb16_playback_prepare': ../sound/isa/sb/sb16_main.c:253:72: error: 'DMA_AUTOINIT' undeclared (first use in this function) 253 | snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT); | ^~~~~~~~~~~~ ../sound/isa/sb/sb16_main.c:253:72: note: each undeclared identifier is reported only once for each function it appears in ../sound/isa/sb/sb16_main.c: In function 'snd_sb16_capture_prepare': ../sound/isa/sb/sb16_main.c:322:71: error: 'DMA_AUTOINIT' undeclared (first use in this function) 322 | snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT); | ^~~~~~~~~~~~ and more... Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org Cc: linux-m68k@lists.linux-m68k.org Cc: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20211016062602.3588-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: gus: Fix repeated probe for ISA interwave cardTakashi Iwai2021-09-071-30/+31
| | | | | | | | | | The legacy ISA probe tries to probe the card repeatedly, and this would conflict with the refactoring using devres. Put the card creation out of the loop and only probe GUS object repeatedly. Fixes: 5b88da3c800f ("ALSA: gus: Allocate resources with device-managed APIs") Link: https://lore.kernel.org/r/20210907093930.29009-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: gus: Fix repeated probes of snd_gus_create()Takashi Iwai2021-09-071-13/+31
| | | | | | | | | | | | | GUS card object may be repeatedly probed for the legacy ISA devices, and the behavior doesn't fit with the devres resource management. Revert partially back to the classical way for the snd_gus_card object, so that the repeated calls of snd_gus_create() are allowed. Fixes: 5b88da3c800f ("ALSA: gus: Allocate resources with device-managed APIs") Reported-by: kernel test robot <oliver.sang@intel.com> Link: https://lore.kernel.org/r/20210907093930.29009-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: msnd: Use proper mmap methodTakashi Iwai2021-08-091-2/+6
| | | | | | | | | | | The old ISA MSND driver basically maps the iomem as the DMA buffer. For this type of buffer, we have already the standard mmap helper, snd_pcm_lib_mmap_iomem(). Correct the PCM info, set the DMA address and use the standard helper for handling the mmap on all architectures properly. Link: https://lore.kernel.org/r/20210809140532.11006-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: es1688: Avoid devres management for es1688 object creationTakashi Iwai2021-08-051-9/+20
| | | | | | | | | | | | | | | | | The recent refactoring of es1688 object creation with the use of devres caused a problem with the non-PnP probe of GUS driver, as it tries to probe multiple times with different parameters That is, this object needs the immediate resource release and the devres doesn't fit for it. This patch reverts partially the commit for restoring the classic resource management for es1688 object. Fixes: 1bb11c1c7f6e ("ALSA: es1688: Allocate resources with device-managed APIs") Reported-by: kernel test robot <oliver.sang@intel.com> Link: https://lore.kernel.org/r/20210805032513.GA30485@xsang-OptiPlex-9020 Link: https://lore.kernel.org/r/20210805062148.30951-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2021-08-021-0/+4
|\
| * ALSA: sb: Fix potential ABBA deadlock in CSP driverTakashi Iwai2021-07-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SB16 CSP driver may hit potentially a typical ABBA deadlock in two code paths: In snd_sb_csp_stop(): spin_lock_irqsave(&p->chip->mixer_lock, flags); spin_lock(&p->chip->reg_lock); In snd_sb_csp_load(): spin_lock_irqsave(&p->chip->reg_lock, flags); spin_lock(&p->chip->mixer_lock); Also the similar pattern is seen in snd_sb_csp_start(). Although the practical impact is very small (those states aren't triggered in the same running state and this happens only on a real hardware, decades old ISA sound boards -- which must be very difficult to find nowadays), it's a real scenario and has to be fixed. This patch addresses those deadlocks by splitting the locks in snd_sb_csp_start() and snd_sb_csp_stop() for avoiding the nested locks. Reported-by: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/7b0fcdaf-cd4f-4728-2eae-48c151a92e10@gmail.com Link: https://lore.kernel.org/r/20210716132723.13216-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sc6000: Use explicit cast for __iomem pointerTakashi Iwai2021-07-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The recent optimization to store an iomem pointer in card's private_data field caused sparse warnings. Although they are practically harmless, add the explicit cast for avoiding the spurious warnings. Fixes: 9b7843d1e125 ("ALSA: sc6000: Assign vport directly on card's private_data") Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/202107210511.SnFqlZMa-lkp@intel.com Link: https://lore.kernel.org/r/20210720224902.7169-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sc6000: Assign vport directly on card's private_dataTakashi Iwai2021-07-201-10/+9
| | | | | | | | | | | | | | | | | | | | | | sc6000 driver tries to allocate an extra pointer for keeping the vport address and point it over card->private_data. But, this indirect access is utterly superfluous, and we can keep the vport address directly in card->private_data instead. This will simply the code and avoid confusion. Link: https://lore.kernel.org/r/20210720162837.6026-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sc6000: Fix incorrect sizeof operatorColin Ian King2021-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Static analysis is warning that the sizeof being used is should be of *vport and not vport. Although these are the same size it is not a portable assumption to assume this is true for all cases. Fix this by using sizeof(*vport). Addresses-Coverity: ("Sizeof not portable") Fixes: 111601ff76e9 ("ALSA: sc6000: Allocate resources with device-managed APIs") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210720161707.74197-1-colin.king@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: opti9xx: fix missing { } around an if blockColin Ian King2021-07-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Currently the { } braces are missing around an if block causing subsequent code after the return to become unreachable. Fix this by adding the missing { }. Addresses-Coverity: ("Structurally dead code") Fixes: 2973ee4a5b54 ("ALSA: opti9xx: Allocate resources with device-managed APIs") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210720153741.73230-1-colin.king@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: wavefront: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-37/+9
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA wavefront driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-72-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sscape: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-72/+20
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA sscape driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-71-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sc6000: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-47/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA als100 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The cleanup code was moved from the remove callback to card->private_free, and then the remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-70-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: opl3sa2: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-49/+11
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA opl3sa2 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-69-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: opti9xx: Allocate resources with device-managed APIsTakashi Iwai2021-07-192-112/+44
| | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA als100 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-68-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: msnd: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-91/+28
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA msnd drivers with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-67-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: gus: Allocate resources with device-managed APIsTakashi Iwai2021-07-195-161/+68
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA gus drivers with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-66-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: galaxy: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-49/+33
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA galaxy drivers with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-65-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: es18xx: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-92/+20
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA es18xx driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-64-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: es1688: Allocate resources with device-managed APIsTakashi Iwai2021-07-192-44/+18
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA es1688 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-63-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: cs423x: Allocate resources with device-managed APIsTakashi Iwai2021-07-192-60/+13
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA cs423x drivers with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-62-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: cmi8330: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-23/+4
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA cmi8330 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-61-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: cmi8328: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-21/+10
| | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA cmi8328 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-60-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: azt2320: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-37/+12
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA azt2320 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-59-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: als100: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-31/+10
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA als100 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-58-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: adlib: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA adlib driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-57-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: ad1848: Allocate resources with device-managed APIsTakashi Iwai2021-07-191-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA ad1848 driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. The remove callback became superfluous and dropped. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-56-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sb: Allocate resources with device-managed APIsTakashi Iwai2021-07-195-189/+52
| | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA sb drivers with devres as a clean up. Each manual resource management is converted with the corresponding devres helper, and the card object release is managed now via card->private_free instead of a lowlevel snd_device. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-55-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: wss: Allocate resources with device-managed APIsTakashi Iwai2021-07-192-58/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the resource management in ISA wss driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper. Since the whole destructor code could be removed by the conversion, the lowlevel snd_device was dropped as well. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-54-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: ad1816a: Allocate resources with device-managed APIsTakashi Iwai2021-07-192-74/+16
|/ | | | | | | | | | | | This patch converts the resource management in ISA ad1816a driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper, and the card object release is managed now via card->private_free instead of a lowlevel snd_device. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-53-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: isa: Fix error return code in snd_cmi8330_probe()Zhen Lei2021-07-071-1/+1
| | | | | | | | | | | | When 'SB_HW_16' check fails, the error code -ENODEV instead of 0 should be returned, which is the same as that returned when 'WSS_HW_CMI8330' check fails. Fixes: 43bcd973d6d0 ("[ALSA] Add snd_card_set_generic_dev() call to ISA drivers") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Link: https://lore.kernel.org/r/20210707074051.2663-1-thunder.leizhen@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge tag 'asoc-fix-v5.13-rc7' of ↵Takashi Iwai2021-06-243-23/+10
|\ | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Fixes for v5.13 A final batch of fixes for v5.13, this is larger than I'd like due to the fixes for a series of suspend issues that Intel turned up in their testing this week.
| * ALSA: sb8: Add a comment note regarding an unused pointerAtul Gopinathan2021-05-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The field "fm_res" of "struct snd_sb8" is never used/dereferenced throughout the sb8.c code. Therefore there is no need for any null value check after the "request_region()". Add a comment note to make developers know about this and prevent any "NULL check" patches on this part of code. Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Atul Gopinathan <atulgopinathan@gmail.com> Link: https://lore.kernel.org/r/20210503115736.2104747-36-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Revert "ALSA: sb8: add a check for request_region"Greg Kroah-Hartman2021-05-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dcd0feac9bab901d5739de51b3f69840851f8919. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit message for this change was incorrect as the code path can never result in a NULL dereference, alluding to the fact that whatever tool was used to "find this" is broken. It's just an optional resource reservation, so removing this check is fine. Cc: Kangjie Lu <kjlu@umn.edu> Acked-by: Takashi Iwai <tiwai@suse.de> Fixes: dcd0feac9bab ("ALSA: sb8: add a check for request_region") Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210503115736.2104747-35-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Revert "ALSA: gus: add a check of the status of snd_ctl_add"Greg Kroah-Hartman2021-05-131-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0f25e000cb4398081748e54f62a902098aa79ec1. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit did nothing if there was an error, except to print out a message, which is pointless. So remove the commit as it gives a "false sense of doing something". Cc: Kangjie Lu <kjlu@umn.edu> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210503115736.2104747-33-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Revert "ALSA: sb: fix a missing check of snd_ctl_add"Greg Kroah-Hartman2021-05-131-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit beae77170c60aa786f3e4599c18ead2854d8694d. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It is safe to ignore this error as the mixer element is optional, and the driver is very legacy. Cc: Aditya Pakki <pakki001@umn.edu> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210503115736.2104747-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | ALSA: isa: Fix assignment in if conditionTakashi Iwai2021-06-092-4/+8
| | | | | | | | | | | | | | | | | | | | | | ISA ES1688 and WSS driver code contains a few assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-15-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: azt2320: Fix assignment in if conditionTakashi Iwai2021-06-091-7/+14
| | | | | | | | | | | | | | | | | | | | | | ISA AZT2320 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-14-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: als100: Fix assignment in if conditionTakashi Iwai2021-06-091-6/+12
| | | | | | | | | | | | | | | | | | | | | | ISA ALS100 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-13-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: cmi8330: Fix assignment in if conditionTakashi Iwai2021-06-091-14/+23
| | | | | | | | | | | | | | | | | | | | | | ISA CMI8330 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-12-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: es18xx: Fix assignment in if conditionTakashi Iwai2021-06-091-17/+34
| | | | | | | | | | | | | | | | | | | | | | ISA ES18xx driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-11-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: opl3sa2: Fix assignment in if conditionTakashi Iwai2021-06-091-24/+44
| | | | | | | | | | | | | | | | | | | | | | ISA OPL3SA2 driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-10-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: opti9xx: Fix assignment in if conditionTakashi Iwai2021-06-092-18/+36
| | | | | | | | | | | | | | | | | | | | | | ISA Opti9xx driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-9-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: cs423x: Fix assignment in if conditionTakashi Iwai2021-06-092-11/+22
| | | | | | | | | | | | | | | | | | | | | | ISA CS423x driver code contains lots of assignments in if condition, which is a bad coding style that may confuse readers and occasionally lead to bugs. This patch is merely for coding-style fixes, no functional changes. Link: https://lore.kernel.org/r/20210608140540.17885-8-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>