瀏覽代碼

drm/omap: fix uninitialized ret variable

audio_config function for both HDMI4 and HDMI5 return uninitialized
value as the error code if the display is not currently enabled. For
some reason this has not caused any issues.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180329104038.29154-1-tomi.valkeinen@ti.com
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Tomi Valkeinen 7 年之前
父節點
當前提交
77eeac24b1
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      drivers/gpu/drm/omapdrm/dss/hdmi4.c
  2. 1 1
      drivers/gpu/drm/omapdrm/dss/hdmi5.c

+ 1 - 1
drivers/gpu/drm/omapdrm/dss/hdmi4.c

@@ -679,7 +679,7 @@ static int hdmi_audio_config(struct device *dev,
 			     struct omap_dss_audio *dss_audio)
 {
 	struct omap_hdmi *hd = dev_get_drvdata(dev);
-	int ret;
+	int ret = 0;
 
 	mutex_lock(&hd->lock);
 

+ 1 - 1
drivers/gpu/drm/omapdrm/dss/hdmi5.c

@@ -671,7 +671,7 @@ static int hdmi_audio_config(struct device *dev,
 			     struct omap_dss_audio *dss_audio)
 {
 	struct omap_hdmi *hd = dev_get_drvdata(dev);
-	int ret;
+	int ret = 0;
 
 	mutex_lock(&hd->lock);