From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753344AbbF2JDb (ORCPT ); Mon, 29 Jun 2015 05:03:31 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37442 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753268AbbF2JDW (ORCPT ); Mon, 29 Jun 2015 05:03:22 -0400 Date: Mon, 29 Jun 2015 11:03:21 +0200 Message-ID: From: Takashi Iwai To: SF Markus Elfring Cc: Jaroslav Kysela , alsa-devel@alsa-project.org, LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: Re: [PATCH] ALSA: hda: Delete an unnecessary check before the function call "snd_info_free_entry" In-Reply-To: <558FBCA0.2090206@users.sourceforge.net> References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <558FBCA0.2090206@users.sourceforge.net> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Sun, 28 Jun 2015 11:21:36 +0200, SF Markus Elfring wrote: > > From: Markus Elfring > Date: Sun, 28 Jun 2015 11:15:28 +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 Applied, thanks. Takashi > --- > sound/pci/hda/patch_hdmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c > index f852734..2f24338 100644 > --- a/sound/pci/hda/patch_hdmi.c > +++ b/sound/pci/hda/patch_hdmi.c > @@ -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; > } > -- > 2.4.4 >