[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1456287984-10459-10-git-send-email-jeffrey.t.kirsher@intel.com>
Date: Tue, 23 Feb 2016 20:26:13 -0800
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: davem@...emloft.net
Cc: Julia Lawall <julia.lawall@...6.fr>, netdev@...r.kernel.org,
nhorman@...hat.com, sassmann@...hat.com, jogreene@...hat.com,
Gangfeng Huang <gangfeng.huang@...com>,
Fengguang Wu <fengguang.wu@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: [net-next 09/20] igb: fix itnull.cocci warnings
From: Julia Lawall <julia.lawall@...6.fr>
The index variable of list_for_each_entry_safe should never be NULL.
Generated by: scripts/coccinelle/iterators/itnull.cocci
CC: Gangfeng Huang <gangfeng.huang@...com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Tested-by: Aaron Brown <aaron.f.brown@...el.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
---
drivers/net/ethernet/intel/igb/igb_cdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_cdev.c b/drivers/net/ethernet/intel/igb/igb_cdev.c
index 28fafec..5e6579c 100644
--- a/drivers/net/ethernet/intel/igb/igb_cdev.c
+++ b/drivers/net/ethernet/intel/igb/igb_cdev.c
@@ -411,8 +411,7 @@ static int igb_close_file(struct inode *inode, struct file *file)
list_for_each_entry_safe(userpage, tmp,
&adapter->user_page_list, page_node) {
- if (userpage)
- igb_free_page(adapter, userpage);
+ igb_free_page(adapter, userpage);
}
}
mutex_unlock(&adapter->user_page_mutex);
--
2.5.0
Powered by blists - more mailing lists