ALSA: hda: Delete an unnecessary check before the function call "snd_info_free_entry"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 28 Jun 2015 09:15:28 +0000 (11:15 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 29 Jun 2015 09:02:36 +0000 (11:02 +0200)
The snd_info_free_entry() function tests whether its argument is NULL and
then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c

index f8527342a15062517af2be86ec2e9a5bb9e16a28..2f2433845d0487dd703301664cbc33ecfc77bc11 100644 (file)
@@ -591,7 +591,7 @@ static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index)
 
 static void eld_proc_free(struct hdmi_spec_per_pin *per_pin)
 {
-       if (!per_pin->codec->bus->shutdown && per_pin->proc_entry) {
+       if (!per_pin->codec->bus->shutdown) {
                snd_info_free_entry(per_pin->proc_entry);
                per_pin->proc_entry = NULL;
        }