Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/YmFzutFV/iDyEQF2@dd18de969aa6

authored by

kernel test robot and committed by
Neil Armstrong
0e48711f 8f97344a

+2 -4
+2 -4
drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c
··· 77 77 struct hdmi_codec_params *params) 78 78 { 79 79 struct snd_dw_hdmi *dw = dev_get_drvdata(dev); 80 - int ret = 0; 81 80 u8 ca; 82 81 83 82 dw_hdmi_set_sample_rate(dw->data.hdmi, params->sample_rate); ··· 90 91 params->iec.status[0] & IEC958_AES0_NONAUDIO); 91 92 dw_hdmi_set_sample_width(dw->data.hdmi, params->sample_width); 92 93 93 - return ret; 94 + return 0; 94 95 } 95 96 96 97 static void audio_shutdown(struct device *dev, void *data) ··· 101 102 bool enable, int direction) 102 103 { 103 104 struct snd_dw_hdmi *dw = dev_get_drvdata(dev); 104 - int ret = 0; 105 105 106 106 if (!enable) 107 107 dw_hdmi_audio_enable(dw->data.hdmi); 108 108 else 109 109 dw_hdmi_audio_disable(dw->data.hdmi); 110 110 111 - return ret; 111 + return 0; 112 112 } 113 113 114 114 static int audio_get_eld(struct device *dev, void *data,