summaryrefslogtreecommitdiff
path: root/sound/firewire/iso-resources.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-08-25 14:44:05 +0100
committerMark Brown <broonie@kernel.org>2017-08-25 14:44:05 +0100
commitb7e2672d1a23a53bd2657704bf94a8dc8880cc49 (patch)
tree7e315f84913b6cd896fda558724961b39a735587 /sound/firewire/iso-resources.c
parentc0d1cb8366bab9963822c27b0d40cb8b32928cdc (diff)
parent9ce76511b67be8fbcdff36b7e1662e3887bb7377 (diff)
Merge tag 'sound-4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-rt5677
sound fixes for 4.13-rc7 We're keeping in a good shape, this batch contains just a few small fixes (a regression fix for ASoC rt5677 codec, NULL dereference and error-path fixes in firewire, and a corner-case ioctl error fix for user TLV), as well as usual quirks for USB-audio and HD-audio.
Diffstat (limited to 'sound/firewire/iso-resources.c')
-rw-r--r--sound/firewire/iso-resources.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/firewire/iso-resources.c b/sound/firewire/iso-resources.c
index f0e4d502d604..066b5df666f4 100644
--- a/sound/firewire/iso-resources.c
+++ b/sound/firewire/iso-resources.c
@@ -210,9 +210,14 @@ EXPORT_SYMBOL(fw_iso_resources_update);
*/
void fw_iso_resources_free(struct fw_iso_resources *r)
{
- struct fw_card *card = fw_parent_device(r->unit)->card;
+ struct fw_card *card;
int bandwidth, channel;
+ /* Not initialized. */
+ if (r->unit == NULL)
+ return;
+ card = fw_parent_device(r->unit)->card;
+
mutex_lock(&r->mutex);
if (r->allocated) {