mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>, "Brent Lu" <brent.lu@intel.com>,
	"Guennadi Liakhovetski" <guennadi.liakhovetski@linux.intel.com>,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
	"Dan Carpenter" <dan.carpenter@oracle.com>
Subject: [PATCH 08/23] ASoC: hdac_hdmi: remove useless initializations
Date: Fri, 12 Mar 2021 12:22:31 -0600	[thread overview]
Message-ID: <20210312182246.5153-9-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20210312182246.5153-1-pierre-louis.bossart@linux.intel.com>

Cppcheck complains a lot about possible null pointer dereferences but
it's again a case of useless initializations to NULL.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/hdac_hdmi.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 2c1305bf0572..66408a98298b 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -523,7 +523,7 @@ static struct hdac_hdmi_port *hdac_hdmi_get_port_from_cvt(
 			struct hdac_hdmi_cvt *cvt)
 {
 	struct hdac_hdmi_pcm *pcm;
-	struct hdac_hdmi_port *port = NULL;
+	struct hdac_hdmi_port *port;
 	int ret, i;
 
 	list_for_each_entry(pcm, &hdmi->pcm_list, head) {
@@ -713,7 +713,7 @@ static struct hdac_hdmi_pcm *hdac_hdmi_get_pcm(struct hdac_device *hdev,
 					struct hdac_hdmi_port *port)
 {
 	struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev);
-	struct hdac_hdmi_pcm *pcm = NULL;
+	struct hdac_hdmi_pcm *pcm;
 	struct hdac_hdmi_port *p;
 
 	list_for_each_entry(pcm, &hdmi->pcm_list, head) {
@@ -900,7 +900,7 @@ static int hdac_hdmi_set_pin_port_mux(struct snd_kcontrol *kcontrol,
 	struct hdac_hdmi_port *port = w->priv;
 	struct hdac_device *hdev = dev_to_hdac_dev(dapm->dev);
 	struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev);
-	struct hdac_hdmi_pcm *pcm = NULL;
+	struct hdac_hdmi_pcm *pcm;
 	const char *cvt_name =  e->texts[ucontrol->value.enumerated.item[0]];
 
 	ret = snd_soc_dapm_put_enum_double(kcontrol, ucontrol);
@@ -1693,7 +1693,7 @@ static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe)
 {
 	struct hdac_device *hdev = aptr;
 	struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev);
-	struct hdac_hdmi_pin *pin = NULL;
+	struct hdac_hdmi_pin *pin;
 	struct hdac_hdmi_port *hport = NULL;
 	struct snd_soc_component *component = hdmi->component;
 	int i;
@@ -1958,7 +1958,7 @@ static int hdmi_codec_probe(struct snd_soc_component *component)
 	struct hdac_device *hdev = hdmi->hdev;
 	struct snd_soc_dapm_context *dapm =
 		snd_soc_component_get_dapm(component);
-	struct hdac_ext_link *hlink = NULL;
+	struct hdac_ext_link *hlink;
 	int ret;
 
 	hdmi->component = component;
@@ -2227,7 +2227,7 @@ static int hdac_hdmi_runtime_suspend(struct device *dev)
 {
 	struct hdac_device *hdev = dev_to_hdac_dev(dev);
 	struct hdac_bus *bus = hdev->bus;
-	struct hdac_ext_link *hlink = NULL;
+	struct hdac_ext_link *hlink;
 
 	dev_dbg(dev, "Enter: %s\n", __func__);
 
@@ -2263,7 +2263,7 @@ static int hdac_hdmi_runtime_resume(struct device *dev)
 {
 	struct hdac_device *hdev = dev_to_hdac_dev(dev);
 	struct hdac_bus *bus = hdev->bus;
-	struct hdac_ext_link *hlink = NULL;
+	struct hdac_ext_link *hlink;
 
 	dev_dbg(dev, "Enter: %s\n", __func__);
 
-- 
2.25.1


  parent reply	other threads:[~2021-03-12 18:24 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 18:22 [PATCH 00/23] ASoC: codecs: remove cppcheck warnings Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 01/23] ASoC: ab8500-codec: remove useless structure Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 02/23] ASoC: ad1836: remove useless return Pierre-Louis Bossart
2021-03-12 18:50   ` Lars-Peter Clausen
2021-03-12 18:22 ` [PATCH 03/23] ASoC: adau1977: " Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 04/23] ASoC: cros_ec_codec: remove null pointer dereference warning Pierre-Louis Bossart
2021-03-15 10:39   ` Enric Balletbo i Serra
2021-03-12 18:22 ` [PATCH 05/23] ASoC: cx2070x: remove useless assignment Pierre-Louis Bossart
2021-03-14  8:30   ` Takashi Iwai
2021-03-14  8:30   ` Takashi Iwai
2021-03-12 18:22 ` [PATCH 06/23] ASoC: cx2070x: remove duplicate else branch Pierre-Louis Bossart
2021-03-14  8:32   ` Takashi Iwai
2021-03-12 18:22 ` [PATCH 07/23] ASoC: da7219-aad: remove useless initialization Pierre-Louis Bossart
2021-03-15 14:50   ` Adam Thomson
2021-03-12 18:22 ` Pierre-Louis Bossart [this message]
2021-03-12 18:22 ` [PATCH 09/23] ASoC: hdac_hdmi: align function arguments Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 10/23] ASoC: hdmi-codec: remove useless initialization Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 11/23] ASoC: hdmi-codec: remove unused spk_mask member Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 12/23] ASoC: max98090: remove useless assignment Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 13/23] ASoC: mt6358: remove useless initializations Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 14/23] ASoC: mt6359: remove useless assignment Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 15/23] ASoC: nau8825: " Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 16/23] ASoC: pcm1681: " Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 17/23] ASoC: sigmadsp: align function prototype Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 18/23] ASoC: sti-sas: remove unused struct members Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 19/23] ASoC: tas2562: remove useless assignment Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 20/23] ASoC: tas2562: remove warning on return value Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 21/23] ASoC: tas2770: remove useless initialization Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 22/23] ASoC: tlv320dac33: clarify expression Pierre-Louis Bossart
2021-03-12 18:22 ` [PATCH 23/23] ASoC: tscs454: remove useless test on PLL disable Pierre-Louis Bossart
2021-03-18 18:33 ` [PATCH 00/23] ASoC: codecs: remove cppcheck warnings Mark Brown
2021-03-18 18:36   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210312182246.5153-9-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=brent.lu@intel.com \
    --cc=broonie@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®