Message ID | 20180329104038.29154-1-tomi.valkeinen@ti.com |
---|---|
State | Accepted |
Commit | 77eeac24b10fc84d3ffd5b11a897dff88dde244d |
Headers | show |
Series | [1/3] drm/omap: fix uninitialized ret variable | expand |
On 29 March 2018 at 11:40, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: > 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. > Doubt many people try hdmi audio with disabled display ;-) Reviewed-by: Emil Velikov <emil.velikov@collabora.com> -Emil
On 29/03/18 13:58, Emil Velikov wrote: > On 29 March 2018 at 11:40, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote: >> 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. >> > Doubt many people try hdmi audio with disabled display ;-) I think it can happen if the display is connected but blanked. > Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Thanks for the review! Tomi
Hi Tomi, Thank you for the patch. On Thursday, 29 March 2018 13:40:36 EEST Tomi Valkeinen wrote: > 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> I wonder why the compiler hasn't caught this before. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- > drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c > b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 97c88861d67a..5879f45f6fc9 > 100644 > --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c > +++ b/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); > > diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c > b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index d28da9ac3e90..ae1a001d1b83 > 100644 > --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c > +++ b/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);
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 97c88861d67a..5879f45f6fc9 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/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); diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index d28da9ac3e90..ae1a001d1b83 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/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);
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> --- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 2 +- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)