* [PATCH] ASoC: soc-cache: Avoid a redundant test for codec->reg_def_copy
@ 2011-08-20 13:04 Axel Lin
0 siblings, 0 replies; only message in thread
From: Axel Lin @ 2011-08-20 13:04 UTC (permalink / raw)
To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, alsa-devel, Dimitris Papastamos
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/soc-cache.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index fdfd488..d620147 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -727,13 +727,11 @@ static int snd_soc_lzo_cache_init(struct snd_soc_codec *codec)
* and remember to free it afterwards.
*/
tofree = 0;
- if (!codec->reg_def_copy)
- tofree = 1;
-
if (!codec->reg_def_copy) {
codec->reg_def_copy = kzalloc(codec->reg_size, GFP_KERNEL);
if (!codec->reg_def_copy)
return -ENOMEM;
+ tofree = 1;
}
blkcount = snd_soc_lzo_block_count();
--
1.7.4.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-20 13:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-20 13:04 [PATCH] ASoC: soc-cache: Avoid a redundant test for codec->reg_def_copy Axel Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox