Commit 83d04c39 authored by Alex Deucher's avatar Alex Deucher

drm/radeon: initialize sadb to NULL in the audio code

Fixes kfree of the sadb buffer when it's NULL.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1db78024
...@@ -32,7 +32,7 @@ static void dce3_2_afmt_write_speaker_allocation(struct drm_encoder *encoder) ...@@ -32,7 +32,7 @@ static void dce3_2_afmt_write_speaker_allocation(struct drm_encoder *encoder)
struct drm_connector *connector; struct drm_connector *connector;
struct radeon_connector *radeon_connector = NULL; struct radeon_connector *radeon_connector = NULL;
u32 tmp; u32 tmp;
u8 *sadb; u8 *sadb = NULL;
int sad_count; int sad_count;
list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) { list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
......
...@@ -155,7 +155,7 @@ void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder) ...@@ -155,7 +155,7 @@ void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder)
struct drm_connector *connector; struct drm_connector *connector;
struct radeon_connector *radeon_connector = NULL; struct radeon_connector *radeon_connector = NULL;
u32 offset, tmp; u32 offset, tmp;
u8 *sadb; u8 *sadb = NULL;
int sad_count; int sad_count;
if (!dig || !dig->afmt || !dig->afmt->pin) if (!dig || !dig->afmt || !dig->afmt->pin)
......
...@@ -133,7 +133,7 @@ static void dce4_afmt_write_speaker_allocation(struct drm_encoder *encoder) ...@@ -133,7 +133,7 @@ static void dce4_afmt_write_speaker_allocation(struct drm_encoder *encoder)
struct drm_connector *connector; struct drm_connector *connector;
struct radeon_connector *radeon_connector = NULL; struct radeon_connector *radeon_connector = NULL;
u32 tmp; u32 tmp;
u8 *sadb; u8 *sadb = NULL;
int sad_count; int sad_count;
list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) { list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment