diff mbox series

drm/vc4: hdmi: Fix variable ret not used

Message ID 1601003035-31179-1-git-send-email-tiantao6@hisilicon.com
State New, archived
Headers show
Series drm/vc4: hdmi: Fix variable ret not used | expand

Commit Message

Tian Tao Sept. 25, 2020, 3:03 a.m. UTC
drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_set_audio_infoframe’:
drivers/gpu/drm/vc4/vc4_hdmi.c:334:6: warning: variable ‘ret’ set but not
used [-Wunused-but-set-variable]

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index e8f99e2..5c3ddef 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -334,6 +334,10 @@  static void vc4_hdmi_set_audio_infoframe(struct drm_encoder *encoder)
 	int ret;
 
 	ret = hdmi_audio_infoframe_init(&frame.audio);
+	if (ret < 0) {
+		DRM_ERROR("failed to setup audio infoframe");
+		return;
+	}
 
 	frame.audio.coding_type = HDMI_AUDIO_CODING_TYPE_STREAM;
 	frame.audio.sample_frequency = HDMI_AUDIO_SAMPLE_FREQUENCY_STREAM;