diff options
Diffstat (limited to 'sound/firewire/fireworks/fireworks.c')
-rw-r--r-- | sound/firewire/fireworks/fireworks.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c index f2d073365cf6..2ff7b9cff9b0 100644 --- a/sound/firewire/fireworks/fireworks.c +++ b/sound/firewire/fireworks/fireworks.c @@ -188,12 +188,11 @@ static void efw_free(struct snd_efw *efw) { snd_efw_stream_destroy_duplex(efw); snd_efw_transaction_remove_instance(efw); - fw_unit_put(efw->unit); kfree(efw->resp_buf); mutex_destroy(&efw->mutex); - kfree(efw); + fw_unit_put(efw->unit); } /* @@ -312,10 +311,9 @@ efw_probe(struct fw_unit *unit, const struct ieee1394_device_id *entry) { struct snd_efw *efw; - efw = kzalloc(sizeof(struct snd_efw), GFP_KERNEL); + efw = devm_kzalloc(&unit->device, sizeof(struct snd_efw), GFP_KERNEL); if (efw == NULL) return -ENOMEM; - efw->unit = fw_unit_get(unit); dev_set_drvdata(&unit->device, efw); |