From: Tanu Kaskinen Date: Wed, 29 Jan 2014 18:59:00 +0000 (+0200) Subject: alsa: Remove a redundant check X-Git-Url: https://code.delx.au/pulseaudio/commitdiff_plain/9271c11e68ebf1a2781eaf65c1f7d2f836c10280 alsa: Remove a redundant check If mixer_handle is not NULL, then hctl_handle won't be NULL either. The redundant check was confusing, because it looked like we would leak the mixer_handle if mixer_handle is non-NULL and hctl_handle is NULL. --- diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c index 99de0ec1..4357e52b 100644 --- a/src/modules/alsa/alsa-mixer.c +++ b/src/modules/alsa/alsa-mixer.c @@ -3776,8 +3776,8 @@ static void mapping_paths_probe(pa_alsa_mapping *m, pa_alsa_profile *profile, pa_assert(pcm_handle); mixer_handle = pa_alsa_open_mixer_for_pcm(pcm_handle, NULL, &hctl_handle); - if (!mixer_handle || !hctl_handle) { - /* Cannot open mixer, remove all entries */ + if (!mixer_handle) { + /* Cannot open mixer, remove all entries */ pa_hashmap_remove_all(ps->paths); return; }