Since snd_ctl_remove() accepts the NULL kcontrol argument now, we can
drop the check in the caller side.
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
---
sound/pci/emu10k1/emufx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 03efc317e05f..34f385b5cd46 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -959,7 +959,6 @@ static int snd_emu10k1_del_controls(struct snd_emu10k1 *emu,
{
unsigned int i;
struct emu10k1_ctl_elem_id id;
- struct snd_emu10k1_fx8010_ctl *ctl;
struct snd_card *card = emu->card;
int err;
@@ -968,9 +967,7 @@ static int snd_emu10k1_del_controls(struct snd_emu10k1 *emu,
in_kernel);
if (err < 0)
return err;
- ctl = snd_emu10k1_look_for_ctl(emu, &id);
- if (ctl)
- snd_ctl_remove(card, ctl->kcontrol);
+ snd_ctl_remove(card, snd_emu10k1_look_for_ctl(emu, &id));
}
return 0;
}
--
2.43.0
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]