Skip to content

Commit

Permalink
ALSA: sb8: Add a comment note regarding an unused pointer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Atul Gopinathan authored and Greg Kroah-Hartman committed May 13, 2021
1 parent 94f8830 commit a28591f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sound/isa/sb/sb8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a28591f

Please sign in to comment.