forked from Minki/linux
drm/radeon: initialize sadb to NULL in the audio code
Fixes kfree of the sadb buffer when it's NULL. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
1db7802418
commit
83d04c39f9
@ -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) {
|
||||
|
@ -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)
|
||||
|
@ -133,7 +133,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user