Staging: ft1000-usb: use the correct list head
authorDan Carpenter <error27@gmail.com>
Fri, 15 Oct 2010 03:40:42 +0000 (05:40 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 15 Oct 2010 19:24:39 +0000 (12:24 -0700)
Using pdpram_blk here would cause an oops.  We intended to use
&freercvpool.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Tested by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c

index 0ff89c0d31b3e5a627b720c7ffc5b4a63c089acd..3cbf6a87aaf1526a591b8d0c51041b57a726df54 100644 (file)
@@ -1083,7 +1083,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
 
 
 err_free:
-       list_for_each_safe(cur, tmp, &pdpram_blk->list) {
+       list_for_each_safe(cur, tmp, &freercvpool) {
                pdpram_blk = list_entry(cur, DPRAM_BLK, list);
                list_del(&pdpram_blk->list);
                kfree(pdpram_blk->pbuffer);