3.2-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <[email protected]>

commit c5e0b6dbad9b4d18c561af90b384d02373f1c994 upstream.

The proper destructor should be called at the error path.

Signed-off-by: Takashi Iwai <[email protected]>
[bwh: Backported to 3.2: drop the change to nonexistent patch_cs4213()]
Signed-off-by: Ben Hutchings <[email protected]>
---
 sound/pci/hda/patch_cirrus.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -1404,7 +1404,7 @@ static int patch_cs420x(struct hda_codec
        return 0;
 
  error:
-       kfree(codec->spec);
+       cs_free(codec);
        codec->spec = NULL;
        return err;
 }
@@ -1949,7 +1949,7 @@ static int patch_cs421x(struct hda_codec
        return 0;
 
  error:
-       kfree(codec->spec);
+       cs_free(codec);
        codec->spec = NULL;
        return err;
 }


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to