* Patch "ASoC: cht_bsw_rt5645: Fix leftover kmalloc" has been added to the 4.9-stable tree
@ 2017-01-09 15:26 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-09 15:26 UTC (permalink / raw)
To: tiwai, broonie, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ASoC: cht_bsw_rt5645: Fix leftover kmalloc
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
asoc-cht_bsw_rt5645-fix-leftover-kmalloc.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From a823a17981a73faa115bc0f7eda0190763075e2c Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 22 Nov 2016 18:11:08 +0100
Subject: ASoC: cht_bsw_rt5645: Fix leftover kmalloc
From: Takashi Iwai <tiwai@suse.de>
commit a823a17981a73faa115bc0f7eda0190763075e2c upstream.
cht_bsw_rt5645 driver allocates the own codec_id string but doesn't
release it. For simplicity, put the string in cht_mc_private; then
the string is allocated in a shot and released altogether.
Fixes: c8560b7c917f ("ASoC: cht_bsw_rt5645: Fix writing to string literal")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/intel/boards/cht_bsw_rt5645.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -44,6 +44,7 @@ struct cht_acpi_card {
struct cht_mc_private {
struct snd_soc_jack jack;
struct cht_acpi_card *acpi_card;
+ char codec_name[16];
};
static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card)
@@ -354,7 +355,6 @@ static int snd_cht_mc_probe(struct platf
int i;
struct cht_mc_private *drv;
struct snd_soc_card *card = snd_soc_cards[0].soc_card;
- char codec_name[16];
struct sst_acpi_mach *mach;
const char *i2c_name = NULL;
int dai_index = 0;
@@ -374,12 +374,12 @@ static int snd_cht_mc_probe(struct platf
}
card->dev = &pdev->dev;
mach = card->dev->platform_data;
- sprintf(codec_name, "i2c-%s:00", drv->acpi_card->codec_id);
+ sprintf(drv->codec_name, "i2c-%s:00", drv->acpi_card->codec_id);
/* set correct codec name */
for (i = 0; i < ARRAY_SIZE(cht_dailink); i++)
if (!strcmp(card->dai_link[i].codec_name, "i2c-10EC5645:00")) {
- card->dai_link[i].codec_name = kstrdup(codec_name, GFP_KERNEL);
+ card->dai_link[i].codec_name = drv->codec_name;
dai_index = i;
}
Patches currently in stable-queue which might be from tiwai@suse.de are
queue-4.9/alsa-hda-fix-up-gpio-for-asus-rog-ranger.patch
queue-4.9/alsa-hda-apply-asus-mode8-fixup-to-asus-x71sl.patch
queue-4.9/asoc-cht_bsw_rt5645-fix-leftover-kmalloc.patch
queue-4.9/alsa-usb-audio-fix-bogus-error-return-in-snd_usb_create_stream.patch
queue-4.9/alsa-usb-audio-fix-irq-process-data-synchronization.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-09 15:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-09 15:26 Patch "ASoC: cht_bsw_rt5645: Fix leftover kmalloc" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).