summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAtul Gopinathan <atulgopinathan@gmail.com>2021-05-03 13:57:02 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-13 17:33:49 +0200
commita28591f61b60fac820c6de59826ffa710e5e314e (patch)
tree1b7b53c7309f11fd953ae968330f45f4cf0c6194 /sound
parent94f88309f201821073f57ae6005caefa61bf7b7e (diff)
ALSA: sb8: Add a comment note regarding an unused pointer
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/isa/sb/sb8.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index 95290ffe5c6e..ed3a87ebe3f4 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -93,7 +93,11 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev)
acard = card->private_data;
card->private_free = snd_sb8_free;
- /* block the 0x388 port to avoid PnP conflicts */
+ /*
+ * Block the 0x388 port to avoid PnP conflicts.
+ * No need to check this value after request_region,
+ * as we never do anything with it.
+ */
acard->fm_res = request_region(0x388, 4, "SoundBlaster FM");
if (port[dev] != SNDRV_AUTO_PORT) {