From 372b9b0da3985b20d524335fa12b2c6e733f6a1a Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Tue, 2 Nov 2010 17:44:22 +1000 Subject: [PATCH] --- yaml --- r: 221567 b: refs/heads/master c: 79c1a903ecddc52a7ecbac1e8e73f360ac6d0472 h: refs/heads/master i: 221565: b32792624be0daa0bf12e383baaa666bc7cd2424 221563: b8c1b3d0e1b28a6288dbab33505e23497af206b4 221559: bf279046ae3762e3ae1e958818cd518b6cfc39a7 221551: 5c217fe0ec9e07d4b80fbb9fb62c11a01fc08637 221535: db8b0332c33f20fea055c93a42de56b15a0a9fb5 221503: 7c5164418e46e0c83a9e32b2ef056606c5a235c1 221439: 8c565d67635e72e770f3dd9dd188f13449d6e0d7 v: v3 --- [refs] | 2 +- trunk/arch/m68k/include/asm/machdep.h | 1 + trunk/mm/vmstat.c | 2 +- trunk/sound/pci/asihpi/hpi6000.c | 2 -- trunk/sound/pci/asihpi/hpi6205.c | 2 -- trunk/sound/pci/asihpi/hpicmn.c | 12 +++------ trunk/sound/pci/cs46xx/dsp_spos.c | 33 ++++++++++++++++-------- trunk/sound/pci/hda/patch_cirrus.c | 1 - trunk/sound/pci/lx6464es/lx6464es.c | 4 +-- trunk/sound/pci/lx6464es/lx6464es.h | 2 +- trunk/sound/pci/lx6464es/lx_core.c | 2 +- trunk/sound/soc/codecs/Kconfig | 3 +-- trunk/sound/soc/codecs/tlv320dac33.c | 36 ++++++++------------------- trunk/sound/soc/codecs/tpa6130a2.c | 6 ++--- trunk/sound/soc/codecs/wm8900.c | 6 +++++ trunk/sound/soc/codecs/wm_hubs.c | 2 +- trunk/sound/soc/pxa/tosa.c | 2 +- trunk/sound/soc/soc-core.c | 5 +--- trunk/sound/usb/mixer_quirks.c | 15 ++--------- trunk/sound/usb/pcm.c | 4 +-- 20 files changed, 58 insertions(+), 84 deletions(-) diff --git a/[refs] b/[refs] index 393a50784ad8..827b8698a0dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ff8b16d7e15a8ba2a6086645614a483e048e3fbf +refs/heads/master: 79c1a903ecddc52a7ecbac1e8e73f360ac6d0472 diff --git a/trunk/arch/m68k/include/asm/machdep.h b/trunk/arch/m68k/include/asm/machdep.h index 789f3b2de0e9..415d5484916c 100644 --- a/trunk/arch/m68k/include/asm/machdep.h +++ b/trunk/arch/m68k/include/asm/machdep.h @@ -40,5 +40,6 @@ extern unsigned long hw_timer_offset(void); extern irqreturn_t arch_timer_interrupt(int irq, void *dummy); extern void config_BSP(char *command, int len); +extern void do_IRQ(int irq, struct pt_regs *fp); #endif /* _M68K_MACHDEP_H */ diff --git a/trunk/mm/vmstat.c b/trunk/mm/vmstat.c index 42eac4d33216..cd2e42be7b68 100644 --- a/trunk/mm/vmstat.c +++ b/trunk/mm/vmstat.c @@ -949,7 +949,7 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos) v[PGPGIN] /= 2; /* sectors -> kbytes */ v[PGPGOUT] /= 2; #endif - return (unsigned long *)m->private + *pos; + return m->private + *pos; } static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos) diff --git a/trunk/sound/pci/asihpi/hpi6000.c b/trunk/sound/pci/asihpi/hpi6000.c index 1b9bf9395cfe..f7e374ec4414 100644 --- a/trunk/sound/pci/asihpi/hpi6000.c +++ b/trunk/sound/pci/asihpi/hpi6000.c @@ -625,8 +625,6 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao, control_cache_size, (struct hpi_control_cache_info *) &phw->control_cache[0] ); - if (!phw->p_cache) - pao->has_control_cache = 0; } else pao->has_control_cache = 0; diff --git a/trunk/sound/pci/asihpi/hpi6205.c b/trunk/sound/pci/asihpi/hpi6205.c index 2672f6591ceb..22c5fc625533 100644 --- a/trunk/sound/pci/asihpi/hpi6205.c +++ b/trunk/sound/pci/asihpi/hpi6205.c @@ -644,8 +644,6 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao, interface->control_cache.size_in_bytes, (struct hpi_control_cache_info *) p_control_cache_virtual); - if (!phw->p_cache) - err = HPI_ERROR_MEMORY_ALLOC; } if (!err) { err = hpios_locked_mem_get_phys_addr(&phw-> diff --git a/trunk/sound/pci/asihpi/hpicmn.c b/trunk/sound/pci/asihpi/hpicmn.c index d67f4d3db911..dda4f1c6f658 100644 --- a/trunk/sound/pci/asihpi/hpicmn.c +++ b/trunk/sound/pci/asihpi/hpicmn.c @@ -571,20 +571,14 @@ struct hpi_control_cache *hpi_alloc_control_cache(const u32 { struct hpi_control_cache *p_cache = kmalloc(sizeof(*p_cache), GFP_KERNEL); - if (!p_cache) - return NULL; - p_cache->p_info = - kmalloc(sizeof(*p_cache->p_info) * number_of_controls, - GFP_KERNEL); - if (!p_cache->p_info) { - kfree(p_cache); - return NULL; - } p_cache->cache_size_in_bytes = size_in_bytes; p_cache->control_count = number_of_controls; p_cache->p_cache = (struct hpi_control_cache_single *)pDSP_control_buffer; p_cache->init = 0; + p_cache->p_info = + kmalloc(sizeof(*p_cache->p_info) * p_cache->control_count, + GFP_KERNEL); return p_cache; } diff --git a/trunk/sound/pci/cs46xx/dsp_spos.c b/trunk/sound/pci/cs46xx/dsp_spos.c index e377287192aa..3e5ca8fb519f 100644 --- a/trunk/sound/pci/cs46xx/dsp_spos.c +++ b/trunk/sound/pci/cs46xx/dsp_spos.c @@ -225,25 +225,39 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) { struct dsp_spos_instance * ins = kzalloc(sizeof(struct dsp_spos_instance), GFP_KERNEL); - if (ins == NULL) + if (ins == NULL) return NULL; /* better to use vmalloc for this big table */ + ins->symbol_table.nsymbols = 0; ins->symbol_table.symbols = vmalloc(sizeof(struct dsp_symbol_entry) * DSP_MAX_SYMBOLS); - ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL); - ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL); - if (!ins->symbol_table.symbols || !ins->code.data || !ins->modules) { + ins->symbol_table.highest_frag_index = 0; + + if (ins->symbol_table.symbols == NULL) { cs46xx_dsp_spos_destroy(chip); goto error; } - ins->symbol_table.nsymbols = 0; - ins->symbol_table.highest_frag_index = 0; + ins->code.offset = 0; ins->code.size = 0; + ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL); + + if (ins->code.data == NULL) { + cs46xx_dsp_spos_destroy(chip); + goto error; + } + ins->nscb = 0; ins->ntask = 0; + ins->nmodules = 0; + ins->modules = kmalloc(sizeof(struct dsp_module_desc) * DSP_MAX_MODULES, GFP_KERNEL); + + if (ins->modules == NULL) { + cs46xx_dsp_spos_destroy(chip); + goto error; + } /* default SPDIF input sample rate to 48000 khz */ @@ -257,8 +271,8 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) /* set left and right validity bits and default channel status */ - ins->spdif_csuv_default = - ins->spdif_csuv_stream = + ins->spdif_csuv_default = + ins->spdif_csuv_stream = /* byte 0 */ ((unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF & 0xff)) << 24) | /* byte 1 */ ((unsigned int)_wrap_all_bits( ((SNDRV_PCM_DEFAULT_CON_SPDIF >> 8) & 0xff)) << 16) | /* byte 3 */ (unsigned int)_wrap_all_bits( (SNDRV_PCM_DEFAULT_CON_SPDIF >> 24) & 0xff) | @@ -267,9 +281,6 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip) return ins; error: - kfree(ins->modules); - kfree(ins->code.data); - vfree(ins->symbol_table.symbols); kfree(ins); return NULL; } diff --git a/trunk/sound/pci/hda/patch_cirrus.c b/trunk/sound/pci/hda/patch_cirrus.c index 18af38ebf757..460fb2ef7e39 100644 --- a/trunk/sound/pci/hda/patch_cirrus.c +++ b/trunk/sound/pci/hda/patch_cirrus.c @@ -1166,7 +1166,6 @@ static const char *cs420x_models[CS420X_MODELS] = { static struct snd_pci_quirk cs420x_cfg_tbl[] = { SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53), - SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55), SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55), SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), diff --git a/trunk/sound/pci/lx6464es/lx6464es.c b/trunk/sound/pci/lx6464es/lx6464es.c index 1bd7a540fd49..ef9af3f4ace2 100644 --- a/trunk/sound/pci/lx6464es/lx6464es.c +++ b/trunk/sound/pci/lx6464es/lx6464es.c @@ -425,7 +425,7 @@ static int lx_pcm_hw_free(struct snd_pcm_substream *substream) static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream) { struct snd_pcm_substream *substream = lx_stream->stream; - const unsigned int is_capture = lx_stream->is_capture; + const int is_capture = lx_stream->is_capture; int err; @@ -473,7 +473,7 @@ static void lx_trigger_start(struct lx6464es *chip, struct lx_stream *lx_stream) static void lx_trigger_stop(struct lx6464es *chip, struct lx_stream *lx_stream) { - const unsigned int is_capture = lx_stream->is_capture; + const int is_capture = lx_stream->is_capture; int err; snd_printd(LXP "stopping: stopping stream\n"); diff --git a/trunk/sound/pci/lx6464es/lx6464es.h b/trunk/sound/pci/lx6464es/lx6464es.h index aea621eafbb5..51afc048961d 100644 --- a/trunk/sound/pci/lx6464es/lx6464es.h +++ b/trunk/sound/pci/lx6464es/lx6464es.h @@ -60,7 +60,7 @@ struct lx_stream { snd_pcm_uframes_t frame_pos; enum lx_stream_status status; /* free, open, running, draining * pause */ - unsigned int is_capture:1; + int is_capture:1; }; diff --git a/trunk/sound/pci/lx6464es/lx_core.c b/trunk/sound/pci/lx6464es/lx_core.c index 617f98b0cbae..3086b751da4a 100644 --- a/trunk/sound/pci/lx6464es/lx_core.c +++ b/trunk/sound/pci/lx6464es/lx_core.c @@ -1152,7 +1152,7 @@ static int lx_interrupt_request_new_buffer(struct lx6464es *chip, struct lx_stream *lx_stream) { struct snd_pcm_substream *substream = lx_stream->stream; - const unsigned int is_capture = lx_stream->is_capture; + int is_capture = lx_stream->is_capture; int err; unsigned long flags; diff --git a/trunk/sound/soc/codecs/Kconfig b/trunk/sound/soc/codecs/Kconfig index 3b5690d28b8b..94a9d06b9027 100644 --- a/trunk/sound/soc/codecs/Kconfig +++ b/trunk/sound/soc/codecs/Kconfig @@ -25,9 +25,8 @@ config SND_SOC_ALL_CODECS select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC select SND_SOC_CS42L51 if I2C select SND_SOC_CS4270 if I2C - select SND_SOC_CX20442 select SND_SOC_DA7210 if I2C - select SND_SOC_JZ4740_CODEC if SOC_JZ4740 + select SND_SOC_JZ4740 if SOC_JZ4740 select SND_SOC_MAX98088 if I2C select SND_SOC_MAX9877 if I2C select SND_SOC_PCM3008 diff --git a/trunk/sound/soc/codecs/tlv320dac33.c b/trunk/sound/soc/codecs/tlv320dac33.c index c5ab8c805771..d251ff54a2d3 100644 --- a/trunk/sound/soc/codecs/tlv320dac33.c +++ b/trunk/sound/soc/codecs/tlv320dac33.c @@ -58,7 +58,7 @@ (1000000000 / ((rate * 1000) / samples)) #define US_TO_SAMPLES(rate, us) \ - (rate / (1000000 / (us < 1000000 ? us : 1000000))) + (rate / (1000000 / us)) #define UTHR_FROM_PERIOD_SIZE(samples, playrate, burstrate) \ ((samples * 5000) / ((burstrate * 5000) / (burstrate - playrate))) @@ -200,7 +200,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg, u8 *value) { struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); - int val, ret = 0; + int val; *value = reg & 0xff; @@ -210,7 +210,6 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg, if (val < 0) { dev_err(codec->dev, "Read failed (%d)\n", val); value[0] = dac33_read_reg_cache(codec, reg); - ret = val; } else { value[0] = val; dac33_write_reg_cache(codec, reg, val); @@ -219,7 +218,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg, value[0] = dac33_read_reg_cache(codec, reg); } - return ret; + return 0; } static int dac33_write(struct snd_soc_codec *codec, unsigned int reg, @@ -330,18 +329,13 @@ static void dac33_init_chip(struct snd_soc_codec *codec) dac33_read_reg_cache(codec, DAC33_LINER_TO_RLO_VOL)); } -static inline int dac33_read_id(struct snd_soc_codec *codec) +static inline void dac33_read_id(struct snd_soc_codec *codec) { - int i, ret = 0; u8 reg; - for (i = 0; i < 3; i++) { - ret = dac33_read(codec, DAC33_DEVICE_ID_MSB + i, ®); - if (ret < 0) - break; - } - - return ret; + dac33_read(codec, DAC33_DEVICE_ID_MSB, ®); + dac33_read(codec, DAC33_DEVICE_ID_LSB, ®); + dac33_read(codec, DAC33_DEVICE_REV_ID, ®); } static inline void dac33_soft_power(struct snd_soc_codec *codec, int power) @@ -1082,9 +1076,6 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream) /* Number of samples under i2c latency */ dac33->alarm_threshold = US_TO_SAMPLES(rate, dac33->mode1_latency); - nsample_limit = DAC33_BUFFER_SIZE_SAMPLES - - dac33->alarm_threshold; - if (dac33->auto_fifo_config) { if (period_size <= dac33->alarm_threshold) /* @@ -1095,8 +1086,6 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream) ((dac33->alarm_threshold / period_size) + (dac33->alarm_threshold % period_size ? 1 : 0)); - else if (period_size > nsample_limit) - dac33->nsample = nsample_limit; else dac33->nsample = period_size; } else { @@ -1108,7 +1097,8 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream) */ dac33->nsample_max = substream->runtime->buffer_size - period_size; - + nsample_limit = DAC33_BUFFER_SIZE_SAMPLES - + dac33->alarm_threshold; if (dac33->nsample_max > nsample_limit) dac33->nsample_max = nsample_limit; @@ -1424,15 +1414,9 @@ static int dac33_soc_probe(struct snd_soc_codec *codec) dev_err(codec->dev, "Failed to power up codec: %d\n", ret); goto err_power; } - ret = dac33_read_id(codec); + dac33_read_id(codec); dac33_hard_power(codec, 0); - if (ret < 0) { - dev_err(codec->dev, "Failed to read chip ID: %d\n", ret); - ret = -ENODEV; - goto err_power; - } - /* Check if the IRQ number is valid and request it */ if (dac33->irq >= 0) { ret = request_irq(dac33->irq, dac33_interrupt_handler, diff --git a/trunk/sound/soc/codecs/tpa6130a2.c b/trunk/sound/soc/codecs/tpa6130a2.c index ee4fb201de60..329acc1a2074 100644 --- a/trunk/sound/soc/codecs/tpa6130a2.c +++ b/trunk/sound/soc/codecs/tpa6130a2.c @@ -119,13 +119,13 @@ static int tpa6130a2_power(int power) { struct tpa6130a2_data *data; u8 val; - int ret = 0; + int ret; BUG_ON(tpa6130a2_client == NULL); data = i2c_get_clientdata(tpa6130a2_client); mutex_lock(&data->mutex); - if (power && !data->power_state) { + if (power) { /* Power on */ if (data->power_gpio >= 0) gpio_set_value(data->power_gpio, 1); @@ -153,7 +153,7 @@ static int tpa6130a2_power(int power) val = tpa6130a2_read(TPA6130A2_REG_CONTROL); val &= ~TPA6130A2_SWS; tpa6130a2_i2c_write(TPA6130A2_REG_CONTROL, val); - } else if (!power && data->power_state) { + } else { /* set SWS */ val = tpa6130a2_read(TPA6130A2_REG_CONTROL); val |= TPA6130A2_SWS; diff --git a/trunk/sound/soc/codecs/wm8900.c b/trunk/sound/soc/codecs/wm8900.c index aca4b1ea10bb..b4f11724a63f 100644 --- a/trunk/sound/soc/codecs/wm8900.c +++ b/trunk/sound/soc/codecs/wm8900.c @@ -186,6 +186,7 @@ static int wm8900_volatile_register(unsigned int reg) { switch (reg) { case WM8900_REG_ID: + case WM8900_REG_POWER1: return 1; default: return 0; @@ -1199,6 +1200,11 @@ static int wm8900_probe(struct snd_soc_codec *codec) return -ENODEV; } + /* Read back from the chip */ + reg = snd_soc_read(codec, WM8900_REG_POWER1); + reg = (reg >> 12) & 0xf; + dev_info(codec->dev, "WM8900 revision %d\n", reg); + wm8900_reset(codec); /* Turn the chip on */ diff --git a/trunk/sound/soc/codecs/wm_hubs.c b/trunk/sound/soc/codecs/wm_hubs.c index 19ca782ac970..2cb81538cd91 100644 --- a/trunk/sound/soc/codecs/wm_hubs.c +++ b/trunk/sound/soc/codecs/wm_hubs.c @@ -123,7 +123,7 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec) reg_r = reg & WM8993_DCS_DAC_WR_VAL_0_MASK; break; default: - WARN(1, "Unknown DCS readback method\n"); + WARN(1, "Unknown DCS readback method"); break; } diff --git a/trunk/sound/soc/pxa/tosa.c b/trunk/sound/soc/pxa/tosa.c index 73d0edd8ded9..a3bfb2e8b70f 100644 --- a/trunk/sound/soc/pxa/tosa.c +++ b/trunk/sound/soc/pxa/tosa.c @@ -79,7 +79,7 @@ static void tosa_ext_control(struct snd_soc_codec *codec) static int tosa_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_codec *codec = rtd->codec; + struct snd_soc_codec *codec = rtd->card->codec; /* check the jack status at stream startup */ tosa_ext_control(codec); diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index 614a8b30d87b..1c8f3f507f54 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -165,11 +165,8 @@ static ssize_t pmdown_time_set(struct device *dev, { struct snd_soc_pcm_runtime *rtd = container_of(dev, struct snd_soc_pcm_runtime, dev); - int ret; - ret = strict_strtol(buf, 10, &rtd->pmdown_time); - if (ret) - return ret; + strict_strtol(buf, 10, &rtd->pmdown_time); return count; } diff --git a/trunk/sound/usb/mixer_quirks.c b/trunk/sound/usb/mixer_quirks.c index 782f741cd00a..7dae05d8783e 100644 --- a/trunk/sound/usb/mixer_quirks.c +++ b/trunk/sound/usb/mixer_quirks.c @@ -60,7 +60,7 @@ static const struct rc_config { { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */ { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */ { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */ - { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */ + { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi */ { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */ }; @@ -183,13 +183,7 @@ static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e if (value > 1) return -EINVAL; changed = value != mixer->audigy2nx_leds[index]; - if (mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) - err = snd_usb_ctl_msg(mixer->chip->dev, - usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, - USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, - !value, 0, NULL, 0, 100); - else - err = snd_usb_ctl_msg(mixer->chip->dev, + err = snd_usb_ctl_msg(mixer->chip->dev, usb_sndctrlpipe(mixer->chip->dev, 0), 0x24, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, value, index + 2, NULL, 0, 100); @@ -231,12 +225,8 @@ static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer) int i, err; for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) { - /* USB X-Fi S51 doesn't have a CMSS LED */ - if ((mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) && i == 0) - continue; if (i > 1 && /* Live24ext has 2 LEDs only */ (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || - mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) break; err = snd_ctl_add(mixer->chip->card, @@ -375,7 +365,6 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer) if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020) || mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || - mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) { if ((err = snd_audigy2nx_controls_create(mixer)) < 0) return err; diff --git a/trunk/sound/usb/pcm.c b/trunk/sound/usb/pcm.c index 4132522ac90f..cff3a3c465d7 100644 --- a/trunk/sound/usb/pcm.c +++ b/trunk/sound/usb/pcm.c @@ -676,10 +676,8 @@ static int snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime, if (!needs_knot) return 0; - subs->rate_list.list = kmalloc(sizeof(int) * count, GFP_KERNEL); - if (!subs->rate_list.list) - return -ENOMEM; subs->rate_list.count = count; + subs->rate_list.list = kmalloc(sizeof(int) * count, GFP_KERNEL); subs->rate_list.mask = 0; count = 0; list_for_each_entry(fp, &subs->fmt_list, list) {