diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2014-10-13 13:23:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-12-06 15:57:33 -0800 |
commit | 68814ef48cc23572b14b494216598d3116f71096 (patch) | |
tree | cbe6c15ee1c1ee31adc87756ba7e9d23016156cf | |
parent | 286d4909c35084ec2dedf86391b3a3abb1e1e04c (diff) | |
download | lwn-68814ef48cc23572b14b494216598d3116f71096.tar.gz lwn-68814ef48cc23572b14b494216598d3116f71096.zip |
drm/radeon: initialize sadb to NULL in the audio code
commit 83d04c39f9048807a8500e575ae3f1718a3f45bb upstream.
Fixes kfree of the sadb buffer when it's NULL.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/gpu/drm/radeon/dce3_1_afmt.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/dce6_afmt.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_hdmi.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/dce3_1_afmt.c b/drivers/gpu/drm/radeon/dce3_1_afmt.c index 71f4d26669cd..13a27d971d35 100644 --- a/drivers/gpu/drm/radeon/dce3_1_afmt.c +++ b/drivers/gpu/drm/radeon/dce3_1_afmt.c @@ -32,7 +32,7 @@ static void dce3_2_afmt_write_speaker_allocation(struct drm_encoder *encoder) struct drm_connector *connector; struct radeon_connector *radeon_connector = NULL; u32 tmp; - u8 *sadb; + u8 *sadb = NULL; int sad_count; list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) { diff --git a/drivers/gpu/drm/radeon/dce6_afmt.c b/drivers/gpu/drm/radeon/dce6_afmt.c index 790d8cafdb87..88dd17955db3 100644 --- a/drivers/gpu/drm/radeon/dce6_afmt.c +++ b/drivers/gpu/drm/radeon/dce6_afmt.c @@ -155,7 +155,7 @@ void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder) struct drm_connector *connector; struct radeon_connector *radeon_connector = NULL; u32 offset, tmp; - u8 *sadb; + u8 *sadb = NULL; int sad_count; if (!dig || !dig->afmt || !dig->afmt->pin) diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index 71ebdf89fd76..993978051ede 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c @@ -102,7 +102,7 @@ static void dce4_afmt_write_speaker_allocation(struct drm_encoder *encoder) struct drm_connector *connector; struct radeon_connector *radeon_connector = NULL; u32 tmp; - u8 *sadb; + u8 *sadb = NULL; int sad_count; list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) { |