diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2018-10-03 01:21:53 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-10-04 07:54:08 +0200 |
commit | 72bc8c4378f82307ff09f0959011fef2c818146d (patch) | |
tree | 0180c9dd0c405d634403229958031dfc34f0ec59 /sound/firewire/oxfw/oxfw-spkr.c | |
parent | ALSA: fireworks: use managed-resource to maintain response buffer (diff) | |
download | linux-72bc8c4378f82307ff09f0959011fef2c818146d.tar.xz linux-72bc8c4378f82307ff09f0959011fef2c818146d.zip |
ALSA: oxfw: use managed-resource to maintain model-specific data
ALSA oxfw driver allocates memory objects for data specific to some
models. These objects are used to maintain functionalities specific
to the models for ALSA rawMIDI/control interfaces. They can be
released as managed-resource of 'struct snd_card.card_dev'.
This commit uses managed-resource of the sound card device for this
purpose.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/oxfw/oxfw-spkr.c')
-rw-r--r-- | sound/firewire/oxfw/oxfw-spkr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/firewire/oxfw/oxfw-spkr.c b/sound/firewire/oxfw/oxfw-spkr.c index cb905af0660d..66d4b1f73f0f 100644 --- a/sound/firewire/oxfw/oxfw-spkr.c +++ b/sound/firewire/oxfw/oxfw-spkr.c @@ -270,8 +270,9 @@ int snd_oxfw_add_spkr(struct snd_oxfw *oxfw, bool is_lacie) unsigned int i, first_ch; int err; - spkr = kzalloc(sizeof(struct fw_spkr), GFP_KERNEL); - if (spkr == NULL) + spkr = devm_kzalloc(&oxfw->card->card_dev, sizeof(struct fw_spkr), + GFP_KERNEL); + if (!spkr) return -ENOMEM; oxfw->spec = spkr; |