1
linux/sound/soc/codecs
Jesper Juhl c83f1d7e71 ASoC: wm2000: Fix use-after-free - don't release_firmware() twice on error
In wm2000_i2c_probe(), if we take the true branch in

"
  ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm2000,
                               NULL, 0);
  if (ret != 0)
          goto err_fw;
"

then we'll release_firmware(fw) at the 'err_fw' label. But we've already
done that just a few lines above. That's a use-after-free bug.

This patch restructures the code so that we always call
release_firmware(fw) before leaving the function, but only ever call
it once.
This means that we have to initialize 'fw' to NULL since some paths
may now end up calling it without having called request_firmware(),
but since request_firmware() deals gracefully with NULL pointers, we
are fine if we just NULL initialize it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 11:34:19 +00:00
..
88pm860x-codec.c ASoC: Convert 88pm860x-codec to devm_kzalloc() 2011-12-27 12:58:02 +00:00
88pm860x-codec.h
ac97.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
ad193x.c ASoC: Convert ad193x to devm_kzalloc() 2011-12-28 17:22:40 +00:00
ad193x.h ASoC: ad193x: Use snd_soc_update_bits where appropriate 2011-11-28 18:57:52 +00:00
ad1836.c ASoC: Convert ad1836 to devm_kzalloc() 2011-12-28 17:22:40 +00:00
ad1836.h ASoC: Fix wrong define for AD1836_ADC_WORD_OFFSET 2011-11-22 13:06:14 +00:00
ad1980.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
ad1980.h
ad73311.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
ad73311.h
adau1373.c ASoC: Convert adau1373 to devm_kzalloc() 2011-12-28 17:22:40 +00:00
adau1373.h ASoC: Add ADAU1373 codec support 2011-08-17 00:53:54 +09:00
adau1701.c ASoC: Convert adau1701 to devm_kzalloc() 2011-12-28 17:22:40 +00:00
adau1701.h ASoC: Add ADAU1701 codec driver 2011-06-16 11:24:17 +01:00
adav80x.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
adav80x.h ASoC: Add ADAV80x codec driver 2011-06-28 17:11:20 +01:00
ads117x.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
ak4104.c ASoC: Convert ak4104 to devm_kzalloc() 2011-12-20 10:13:57 +00:00
ak4535.c ASoC: Convert ak4535 to devm_kzalloc() 2011-12-20 10:13:58 +00:00
ak4535.h
ak4641.c ASoC: Fix return value of ak4641_pcm_set_dai_fmt() 2012-01-02 13:08:33 +00:00
ak4641.h ASoC: Asahi Kasei AK4641 codec driver 2011-05-19 14:10:45 -07:00
ak4642.c ASoC: Convert ak4642 to devm_kzalloc() 2011-12-20 10:13:58 +00:00
ak4671.c ASoC: Convert ak4671 to devm_kzalloc() 2011-12-20 10:13:58 +00:00
ak4671.h
alc5623.c ASoC: Convert alc5623 to devm_kzalloc() 2012-01-02 12:28:13 +00:00
alc5623.h
alc5632.c ASoC: Rename ALC5632 MICBIAS to common name convention. 2011-12-13 14:27:19 +08:00
alc5632.h ASoC: Convert ALC5632 codec to use regmap API 2011-11-16 10:41:56 +00:00
cq93vc.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
cs42l51.c ASoC: Convert cs42l51 to devm_kzalloc() 2012-01-02 12:28:11 +00:00
cs42l51.h
cs42l73.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
cs42l73.h ASoC: cs42l73: Unify the way to define bits of register 2011-11-22 13:02:09 +00:00
cs4270.c ASoC: Convert cs4270 to devm_kzalloc() 2012-01-02 12:28:13 +00:00
cs4271.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
cx20442.c ASoC: cx20442: add bias control over a platform provided regulator 2012-01-09 11:20:16 +00:00
cx20442.h
da7210.c ASoC: da7210: Add support for line input and mic 2012-01-02 12:27:29 +00:00
dfbmcs320.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
dmic.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
jz4740.c ASoC: Convert jz4740 to devm_kzalloc() 2011-12-28 17:22:41 +00:00
Kconfig Merge branch 'for-3.2' into for-3.3 2011-12-06 11:01:38 +00:00
l3.c
lm4857.c ASoC: Convert lm4857 to devm_kzalloc() 2011-12-27 12:58:02 +00:00
Makefile ASoC: Remove WM8994 register cache 2011-12-13 00:20:11 +08:00
max9850.c ASoC: Convert max9850 to devm_kzalloc() 2012-01-02 12:28:11 +00:00
max9850.h ASoC: Add MAX9850 codec driver 2011-03-11 12:01:44 +00:00
max9877.c ASoC: max9877: Update register if either val or val2 is changed 2011-11-22 13:06:21 +00:00
max9877.h
max98088.c ASoC: Convert max98088 to devm_kzalloc() 2012-01-02 12:28:11 +00:00
max98088.h ASoC: codecs: max98088: Added digital mute function in DAI1 and DAI2 2011-05-15 21:26:36 -07:00
max98095.c ASoC: Convert max98095 to devm_kzalloc() 2012-01-02 12:28:11 +00:00
max98095.h ASoC: Add EQ and filter to max98095 CODEC driver 2011-04-20 13:50:41 +01:00
pcm3008.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
pcm3008.h
rt5631.c ASoC: Convert rt5631 to devm_kzalloc() 2012-01-02 12:28:12 +00:00
rt5631.h ASoC: Add driver for rt5631 2011-09-21 15:52:23 +01:00
sgtl5000.c ASoC: sgtl5000: Fix wrong register name in restore 2012-01-20 13:54:32 +00:00
sgtl5000.h ASoC: sgtl5000: Fix define for SGTL5000_BIAS_R_MASK 2011-10-19 13:08:18 +01:00
sigmadsp.c ASoC: SigmaDSP: Add regmap support 2011-11-29 12:01:23 +00:00
sigmadsp.h ASoC: SigmaDSP: Add regmap support 2011-11-29 12:01:23 +00:00
sn95031.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
sn95031.h
spdif_transciever.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
ssm2602.c ASoC: Convert ssm2602 to devm_kzalloc() 2012-01-02 12:28:12 +00:00
ssm2602.h ASoC: ssm2602: Support setting the oscillator and the clock output state 2011-09-27 13:30:48 +01:00
sta32x.c ASoC: sta32x: Optimize the array work to find rate_min and rate_max 2012-01-03 21:18:32 +00:00
sta32x.h ASoC: sta32x: preserve coefficient RAM 2011-11-14 21:32:12 +00:00
stac9766.c ASoC: Fix reg_cache_size for stac9766 2011-12-05 13:30:39 +00:00
stac9766.h
tlv320aic3x.c ASoC: Convert tlv320aic3x to devm_kzalloc() 2012-01-02 12:28:12 +00:00
tlv320aic3x.h
tlv320aic23.c ASoC: Convert tlv320aic23 to devm_kzalloc() 2012-01-02 12:28:12 +00:00
tlv320aic23.h
tlv320aic26.c ASoC: Convert tlv320aic26 to devm_kzalloc() 2012-01-02 12:28:12 +00:00
tlv320aic26.h Fix common misspellings 2011-03-31 11:26:23 -03:00
tlv320aic32x4.c ASoC: tlv320aic32x4: always enable analouge block 2012-01-20 13:54:33 +00:00
tlv320aic32x4.h ASoC: Add TI tlv320aic32x4 codec support. 2011-03-04 18:21:08 +00:00
tlv320dac33.c ASoC: Convert tlv320dac33 to devm_kzalloc() 2012-01-02 12:28:13 +00:00
tlv320dac33.h ASoC: tlv320dac33: Update e-mail address 2011-05-11 16:12:35 +01:00
tpa6130a2.c ASoC: Convert tpa6130a2 to devm_kzalloc() 2012-01-02 12:28:13 +00:00
tpa6130a2.h ASoC: tpa6130a2: Update e-mail address 2011-05-11 16:12:45 +01:00
twl4030.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
twl6040.c ASoC: twl6040 - Add method to query optimum PDM_DL1 gain 2012-01-11 12:43:24 +00:00
twl6040.h ASoC: twl6040 - Add method to query optimum PDM_DL1 gain 2012-01-11 12:43:24 +00:00
uda134x.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
uda134x.h
uda1380.c ASoC: Convert uda1380 to devm_kzalloc() 2011-12-27 12:58:02 +00:00
uda1380.h
wl1273.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
wl1273.h
wm1250-ev1.c ASoC: Convert wm1250-ev1 driver to use devm_kzalloc() 2011-11-27 16:03:59 +00:00
wm2000.c ASoC: wm2000: Fix use-after-free - don't release_firmware() twice on error 2012-01-24 11:34:19 +00:00
wm2000.h ASoC: Convert WM2000 into a standard CODEC driver 2011-12-03 21:35:21 +00:00
wm5100-tables.c ASoC: Remove WM5100 DSP memory windows from register default data 2011-11-21 18:11:43 +00:00
wm5100.c ASoC: Don't go through cache when applying WM5100 rev A updates 2012-01-20 13:54:33 +00:00
wm5100.h ASoC: Convert wm5100 to direct regmap API usage 2011-11-08 14:13:50 +00:00
wm8350.c ASoC: Convert WM8350 to table based DAPM and control init 2011-12-03 21:35:10 +00:00
wm8350.h
wm8400.c ASoC: Convert WM8400 to table based DAPM and control init 2011-12-03 21:35:11 +00:00
wm8400.h
wm8510.c ASoC: Convert WM8510 to table based DAPM and control init 2011-12-03 21:35:12 +00:00
wm8510.h
wm8523.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm8523.h
wm8580.c ASoC: Fix return value of wm8580_set_sysclk() 2012-01-02 13:08:40 +00:00
wm8580.h
wm8711.c ASoC: Convert WM8711 to table based control init 2011-12-03 21:35:17 +00:00
wm8711.h
wm8727.c ASoC: Remove unused -codec from Wolfson device driver names 2011-12-03 21:35:01 +00:00
wm8728.c ASoC: Convert WM8728 to table based control init 2011-12-03 21:35:18 +00:00
wm8728.h
wm8731.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm8731.h
wm8737.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm8737.h
wm8741.c ASoC: Convert WM8741 to table based DAPM and control init 2011-12-03 21:35:14 +00:00
wm8741.h
wm8750.c ASoC: Convert WM8750 to table based DAPM and control init 2011-12-03 21:35:16 +00:00
wm8750.h
wm8753.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm8753.h
wm8770.c ASoC: Convert wm8770 to devm_kzalloc() 2011-12-09 20:36:59 +08:00
wm8770.h
wm8776.c Merge branch 'for-3.2' into for-3.3 2011-12-23 18:08:02 +00:00
wm8776.h
wm8782.c ASoC: Convert CODEC drivers to module_platform_driver 2011-11-28 11:33:29 +00:00
wm8804.c ASoC: Convert WM8804 to table based control init 2011-12-09 20:28:17 +08:00
wm8804.h
wm8900.c ASoC: Convert WM8900 to table based DAPM and control init 2011-12-09 20:28:18 +08:00
wm8900.h
wm8903.c ASoC: Fix return value of wm8903_gpio_direction_in() and wm8903_gpio_direction_out() 2012-01-02 13:08:39 +00:00
wm8903.h Merge branch 'for-2.6.38' into for-2.6.39 2011-02-22 10:38:13 -08:00
wm8904.c ASoC: Remove unused -codec from Wolfson device driver names 2011-12-03 21:35:01 +00:00
wm8904.h
wm8940.c ASoC: Remove unused -codec from Wolfson device driver names 2011-12-03 21:35:01 +00:00
wm8940.h
wm8955.c ASoC: Remove unused -codec from Wolfson device driver names 2011-12-03 21:35:01 +00:00
wm8955.h
wm8958-dsp2.c ASoC: wm8958: Use correct format string in dev_err() call 2012-01-23 21:10:22 +00:00
wm8960.c ASoC: Convert WM8960 to devm_kzalloc() 2011-12-17 09:39:41 +00:00
wm8960.h
wm8961.c ASoC: Use standard cache sync code in wm8961 2011-12-17 09:39:44 +00:00
wm8961.h
wm8962.c ASoC: Fix return value of wm8962_gpio_direction_out() 2012-01-02 13:08:34 +00:00
wm8962.h
wm8971.c ASoC: Remove unused -codec from Wolfson device driver names 2011-12-03 21:35:01 +00:00
wm8971.h
wm8974.c ASoC: Remove unused -codec from Wolfson device driver names 2011-12-03 21:35:01 +00:00
wm8974.h
wm8978.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm8978.h
wm8983.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm8983.h ASoC: WM8983: Initial driver 2011-07-15 23:39:53 +09:00
wm8985.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm8985.h
wm8988.c ASoC: Remove unused -codec from Wolfson device driver names 2011-12-03 21:35:01 +00:00
wm8988.h
wm8990.c ASoC: Remove unused -codec from Wolfson device driver names 2011-12-03 21:35:01 +00:00
wm8990.h
wm8991.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm8991.h
wm8993.c ASoC: Wait for WM8993 FLL to stabilise 2012-01-17 16:48:27 +00:00
wm8993.h
wm8994.c ASoC: Enable ASoC register map dump for some regmap CODECs 2011-12-30 01:59:39 +00:00
wm8994.h ASoC: Remove WM8994 register cache 2011-12-13 00:20:11 +08:00
wm8995.c ASoC: Fix wm8995 regmap usage 2011-12-14 13:48:12 +08:00
wm8995.h
wm8996.c ASoC: wm8996: Call _POST_PMU callback for CPVDD 2012-01-22 16:14:06 +00:00
wm8996.h ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK 2012-01-20 13:54:34 +00:00
wm9081.c ASoC: Remove cache default for volatile wm9081 reset register 2011-12-14 17:06:29 +08:00
wm9081.h
wm9090.c ASoC: Use standard snd_soc_cache_sync() for WM9090 2011-12-14 17:07:39 +08:00
wm9090.h
wm9705.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm9705.h
wm9712.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm9712.h
wm9713.c ASoC: Drop unused state parameter from CODEC suspend callback 2011-12-02 10:32:03 +00:00
wm9713.h
wm_hubs.c ASoC: Convert WM8994 MICBIASes to supply widgets 2011-12-02 17:37:49 +00:00
wm_hubs.h ASoC: Support separate left and right channel dcs_codes values 2011-08-01 22:14:49 +09:00