]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/radeon: initialize sadb to NULL in the audio code
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Oct 2014 17:23:48 +0000 (13:23 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2014 23:57:33 +0000 (15:57 -0800)
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>
drivers/gpu/drm/radeon/dce3_1_afmt.c
drivers/gpu/drm/radeon/dce6_afmt.c
drivers/gpu/drm/radeon/evergreen_hdmi.c

index 71f4d26669cd9338526c67932e2d9e1571d60b4d..13a27d971d355cabba262864500dd63f7d696c5f 100644 (file)
@@ -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) {
index 790d8cafdb8720ddd83d2befda8804381f97c4b1..88dd17955db3d70d7a720db296349ea8b10ccc45 100644 (file)
@@ -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)
index 71ebdf89fd761c8e6c5f2100669112dda0b055fb..993978051edee807e8bdb2e90a2d1ecd1452f3da 100644 (file)
@@ -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) {