From: Anand Saggi Date: Wed, 29 Feb 2012 14:18:32 +0000 (-0800) Subject: Fix invalid pointer reference in BUFER_UNDERRUN callback for HDMI Audio. X-Git-Tag: 2.1b_release~247 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19a0c58adc75bbb4f896ba7900d74ced22a7d535;p=kernel%2Fkernel-mfld-blackbay.git Fix invalid pointer reference in BUFER_UNDERRUN callback for HDMI Audio. A Null pointer was being passed in the buffer underrun event, causing tablet to crash as the hdmi audio data pointer is expected. The scenario is reproducible when we plug HDMI during suspended mode when audio is playing and try to wake up. This patch will fix the above described issue. ISSUE: HSD-206962 Signed-off-by: Mohan Kandra Signed-off-by: Kirill A. Shutemov --- diff --git a/drivers/staging/mrst/drv/psb_irq.c b/drivers/staging/mrst/drv/psb_irq.c index 6d76932..815db73 100644 --- a/drivers/staging/mrst/drv/psb_irq.c +++ b/drivers/staging/mrst/drv/psb_irq.c @@ -218,9 +218,14 @@ static void mdfld_pipe_hdmi_audio_underrun(struct drm_device *dev) { struct drm_psb_private *dev_priv = (struct drm_psb_private *) dev->dev_private; + void *had_pvt_data = dev_priv->had_pvt_data; + BUG_ON(had_pvt_data == NULL); + + enum had_event_type event_type = HAD_EVENT_AUDIO_BUFFER_UNDERRUN; if (dev_priv->mdfld_had_event_callbacks) - (*dev_priv->mdfld_had_event_callbacks)(HAD_EVENT_AUDIO_BUFFER_UNDERRUN, NULL); + (*dev_priv->mdfld_had_event_callbacks)(event_type, + had_pvt_data); } /**