aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core-iso.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/core-iso.c')
-rw-r--r--drivers/firewire/core-iso.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c
index 1c0b504a42f3..3784a47865b7 100644
--- a/drivers/firewire/core-iso.c
+++ b/drivers/firewire/core-iso.c
@@ -26,6 +26,7 @@
26#include <linux/firewire-constants.h> 26#include <linux/firewire-constants.h>
27#include <linux/kernel.h> 27#include <linux/kernel.h>
28#include <linux/mm.h> 28#include <linux/mm.h>
29#include <linux/slab.h>
29#include <linux/spinlock.h> 30#include <linux/spinlock.h>
30#include <linux/vmalloc.h> 31#include <linux/vmalloc.h>
31 32
@@ -331,8 +332,9 @@ void fw_iso_resource_manage(struct fw_card *card, int generation,
331 if (ret < 0) 332 if (ret < 0)
332 *bandwidth = 0; 333 *bandwidth = 0;
333 334
334 if (allocate && ret < 0 && c >= 0) { 335 if (allocate && ret < 0) {
335 deallocate_channel(card, irm_id, generation, c, buffer); 336 if (c >= 0)
337 deallocate_channel(card, irm_id, generation, c, buffer);
336 *channel = ret; 338 *channel = ret;
337 } 339 }
338} 340}