Commit 0e48711f authored by kernel test robot's avatar kernel test robot Committed by Neil Armstrong

drm: bridge: dw_hdmi: Audio: fix returnvar.cocci warnings

drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c:80:5-8: Unneeded variable: "ret". Return "0" on line 94
drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c:105:5-8: Unneeded variable: "ret". Return "0" on line 112

 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Sandor Yu <Sandor.yu@nxp.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarkernel test robot <lkp@intel.com>
Reviewed-by: default avatarSandor Yu <Sandor.yu@nxp.com>
Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/YmFzutFV/iDyEQF2@dd18de969aa6
parent 8f97344a
...@@ -77,7 +77,6 @@ static int audio_hw_params(struct device *dev, void *data, ...@@ -77,7 +77,6 @@ static int audio_hw_params(struct device *dev, void *data,
struct hdmi_codec_params *params) struct hdmi_codec_params *params)
{ {
struct snd_dw_hdmi *dw = dev_get_drvdata(dev); struct snd_dw_hdmi *dw = dev_get_drvdata(dev);
int ret = 0;
u8 ca; u8 ca;
dw_hdmi_set_sample_rate(dw->data.hdmi, params->sample_rate); dw_hdmi_set_sample_rate(dw->data.hdmi, params->sample_rate);
...@@ -91,7 +90,7 @@ static int audio_hw_params(struct device *dev, void *data, ...@@ -91,7 +90,7 @@ static int audio_hw_params(struct device *dev, void *data,
params->iec.status[0] & IEC958_AES0_NONAUDIO); params->iec.status[0] & IEC958_AES0_NONAUDIO);
dw_hdmi_set_sample_width(dw->data.hdmi, params->sample_width); dw_hdmi_set_sample_width(dw->data.hdmi, params->sample_width);
return ret; return 0;
} }
static void audio_shutdown(struct device *dev, void *data) static void audio_shutdown(struct device *dev, void *data)
...@@ -102,14 +101,13 @@ static int audio_mute_stream(struct device *dev, void *data, ...@@ -102,14 +101,13 @@ static int audio_mute_stream(struct device *dev, void *data,
bool enable, int direction) bool enable, int direction)
{ {
struct snd_dw_hdmi *dw = dev_get_drvdata(dev); struct snd_dw_hdmi *dw = dev_get_drvdata(dev);
int ret = 0;
if (!enable) if (!enable)
dw_hdmi_audio_enable(dw->data.hdmi); dw_hdmi_audio_enable(dw->data.hdmi);
else else
dw_hdmi_audio_disable(dw->data.hdmi); dw_hdmi_audio_disable(dw->data.hdmi);
return ret; return 0;
} }
static int audio_get_eld(struct device *dev, void *data, static int audio_get_eld(struct device *dev, void *data,
......
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