diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-07 22:44:53 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-07 22:44:53 +0300 |
commit | d969443064abf2f51510559a5b01325eaabfcb1d (patch) | |
tree | cfd76338fc832f3ff9f041fcf491decce17c7fcd /sound/synth/emux/emux_seq.c | |
parent | 3645e6d0dc80be4376f87acc9ee527768387c909 (diff) | |
parent | ee5f38a4459a453ba5d5bdacdcffdf408548338f (diff) | |
download | linux-d969443064abf2f51510559a5b01325eaabfcb1d.tar.xz |
Merge tag 'sound-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"We have touched quite a lot of files but with fewer changes at this
cycle; as you can see, most of changes are trivial fixes, especially
constification patches.
Among the massive attacks by constification gangs, we had a few core
changes (mostly for ASoC core), as well the fixes and the updates by
major vendors.
Some highlights:
ALSA core:
- Fix possible races in control API user-TLV codes
- Small cleanup of PCM core
ASoC:
- Continued work for componentization; still half-baked, but we're
certainly progressing
- Use of devres for jack detection GPIOs, rather as a cleanup
- Jack detection support for Qualcomm MSM8916
- Support for Allwinner H3, Cirrus Logic CS43130, Intel Kabylake
systems with RT5663, Realtek RT274, TI TLV320AIC32x6 and Wolfson
WM8523"
* tag 'sound-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (512 commits)
ALSA: hda/ca0132 - Fix memory leak at error path
ALSA: hda: Fix forget to free resource in error handling code path in hda_codec_driver_probe
ASoC: cs43130: Fix unused compiler warnings for PM runtime
ASoC: cs43130: Fix possible Oops with invalid dev_id
ASoC: cs43130: fix spelling mistake: "irq_occurrance" -> "irq_occurrence"
ALSA: atmel: Remove leftovers of AVR32 removal
ALSA: atmel: convert AC97c driver to GPIO descriptor API
ALSA: hda/realtek - Enable jack detection function for Intel ALC700
ALSA: hda: Fix regression of hdmi eld control created based on invalid pcm
ASoC: Intel: Skylake: Add IPC to configure the copier secondary pins
ASoC: add missing compile rule for max98371
ASoC: add missing compile rule for sirf-audio-codec
ASoC: add missing compile rule for max98371
ASoC: cs43130: Add devicetree bindings for CS43130
ASoC: cs43130: Add support for CS43130 codec
ASoC: make clock direction configurable in asoc-simple
ALSA: ctxfi: Remove null check before kfree
ASoC: max98927: Changed device property read function
ASoC: max98927: Modified DAPM widget and map to enable/disable VI sense path
ASoC: max98927: Added PM suspend and resume function
...
Diffstat (limited to 'sound/synth/emux/emux_seq.c')
-rw-r--r-- | sound/synth/emux/emux_seq.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c index 55579f6b8cb2..396c406d0f77 100644 --- a/sound/synth/emux/emux_seq.c +++ b/sound/synth/emux/emux_seq.c @@ -99,7 +99,7 @@ snd_emux_init_seq(struct snd_emux *emu, struct snd_card *card, int index) sprintf(tmpname, "%s Port %d", emu->name, i); p = snd_emux_create_port(emu, tmpname, MIDI_CHANNELS, 0, &pinfo); - if (p == NULL) { + if (!p) { snd_printk(KERN_ERR "can't create port\n"); return -ENOMEM; } @@ -144,13 +144,13 @@ snd_emux_create_port(struct snd_emux *emu, char *name, int i, type, cap; /* Allocate structures for this channel */ - if ((p = kzalloc(sizeof(*p), GFP_KERNEL)) == NULL) { - snd_printk(KERN_ERR "no memory\n"); + p = kzalloc(sizeof(*p), GFP_KERNEL); + if (!p) return NULL; - } - p->chset.channels = kcalloc(max_channels, sizeof(struct snd_midi_channel), GFP_KERNEL); - if (p->chset.channels == NULL) { - snd_printk(KERN_ERR "no memory\n"); + + p->chset.channels = kcalloc(max_channels, sizeof(*p->chset.channels), + GFP_KERNEL); + if (!p->chset.channels) { kfree(p); return NULL; } @@ -370,8 +370,8 @@ int snd_emux_init_virmidi(struct snd_emux *emu, struct snd_card *card) if (emu->midi_ports <= 0) return 0; - emu->vmidi = kcalloc(emu->midi_ports, sizeof(struct snd_rawmidi *), GFP_KERNEL); - if (emu->vmidi == NULL) + emu->vmidi = kcalloc(emu->midi_ports, sizeof(*emu->vmidi), GFP_KERNEL); + if (!emu->vmidi) return -ENOMEM; for (i = 0; i < emu->midi_ports; i++) { @@ -403,7 +403,7 @@ int snd_emux_delete_virmidi(struct snd_emux *emu) { int i; - if (emu->vmidi == NULL) + if (!emu->vmidi) return 0; for (i = 0; i < emu->midi_ports; i++) { |