Commit 426b3bbc authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: hdac_hdmi: remove useless initializations

Cppcheck complains a lot about possible null pointer dereferences but
it's again a case of useless initializations to NULL.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210312182246.5153-9-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f8a684a4
...@@ -523,7 +523,7 @@ static struct hdac_hdmi_port *hdac_hdmi_get_port_from_cvt( ...@@ -523,7 +523,7 @@ static struct hdac_hdmi_port *hdac_hdmi_get_port_from_cvt(
struct hdac_hdmi_cvt *cvt) struct hdac_hdmi_cvt *cvt)
{ {
struct hdac_hdmi_pcm *pcm; struct hdac_hdmi_pcm *pcm;
struct hdac_hdmi_port *port = NULL; struct hdac_hdmi_port *port;
int ret, i; int ret, i;
list_for_each_entry(pcm, &hdmi->pcm_list, head) { 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, ...@@ -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_port *port)
{ {
struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); 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; struct hdac_hdmi_port *p;
list_for_each_entry(pcm, &hdmi->pcm_list, head) { 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, ...@@ -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_hdmi_port *port = w->priv;
struct hdac_device *hdev = dev_to_hdac_dev(dapm->dev); struct hdac_device *hdev = dev_to_hdac_dev(dapm->dev);
struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); 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]]; const char *cvt_name = e->texts[ucontrol->value.enumerated.item[0]];
ret = snd_soc_dapm_put_enum_double(kcontrol, ucontrol); 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) ...@@ -1693,7 +1693,7 @@ static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe)
{ {
struct hdac_device *hdev = aptr; struct hdac_device *hdev = aptr;
struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); 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 hdac_hdmi_port *hport = NULL;
struct snd_soc_component *component = hdmi->component; struct snd_soc_component *component = hdmi->component;
int i; int i;
...@@ -1958,7 +1958,7 @@ static int hdmi_codec_probe(struct snd_soc_component *component) ...@@ -1958,7 +1958,7 @@ static int hdmi_codec_probe(struct snd_soc_component *component)
struct hdac_device *hdev = hdmi->hdev; struct hdac_device *hdev = hdmi->hdev;
struct snd_soc_dapm_context *dapm = struct snd_soc_dapm_context *dapm =
snd_soc_component_get_dapm(component); snd_soc_component_get_dapm(component);
struct hdac_ext_link *hlink = NULL; struct hdac_ext_link *hlink;
int ret; int ret;
hdmi->component = component; hdmi->component = component;
...@@ -2227,7 +2227,7 @@ static int hdac_hdmi_runtime_suspend(struct device *dev) ...@@ -2227,7 +2227,7 @@ static int hdac_hdmi_runtime_suspend(struct device *dev)
{ {
struct hdac_device *hdev = dev_to_hdac_dev(dev); struct hdac_device *hdev = dev_to_hdac_dev(dev);
struct hdac_bus *bus = hdev->bus; struct hdac_bus *bus = hdev->bus;
struct hdac_ext_link *hlink = NULL; struct hdac_ext_link *hlink;
dev_dbg(dev, "Enter: %s\n", __func__); dev_dbg(dev, "Enter: %s\n", __func__);
...@@ -2263,7 +2263,7 @@ static int hdac_hdmi_runtime_resume(struct device *dev) ...@@ -2263,7 +2263,7 @@ static int hdac_hdmi_runtime_resume(struct device *dev)
{ {
struct hdac_device *hdev = dev_to_hdac_dev(dev); struct hdac_device *hdev = dev_to_hdac_dev(dev);
struct hdac_bus *bus = hdev->bus; struct hdac_bus *bus = hdev->bus;
struct hdac_ext_link *hlink = NULL; struct hdac_ext_link *hlink;
dev_dbg(dev, "Enter: %s\n", __func__); dev_dbg(dev, "Enter: %s\n", __func__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment