瀏覽代碼

firewire: core: remove an always false test

struct fw_cdev_allocate_iso_resource.bandwidth is unsigned.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter 12 年之前
父節點
當前提交
bdabfa5463
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/firewire/core-cdev.c

+ 1 - 2
drivers/firewire/core-cdev.c

@@ -1366,8 +1366,7 @@ static int init_iso_resource(struct client *client,
 	int ret;
 	int ret;
 
 
 	if ((request->channels == 0 && request->bandwidth == 0) ||
 	if ((request->channels == 0 && request->bandwidth == 0) ||
-	    request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL ||
-	    request->bandwidth < 0)
+	    request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL)
 		return -EINVAL;
 		return -EINVAL;
 
 
 	r  = kmalloc(sizeof(*r), GFP_KERNEL);
 	r  = kmalloc(sizeof(*r), GFP_KERNEL);