Skip to contentSkip to conversation

igb: fix itnull.cocci warnings

PATCH New Julia Lawall 2 participants 2 messages Dec 23, 2015 – Jan 8, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 igb: fix itnull.cocci warnings

The index variable of list_for_each_entry_safe should never be NULL.

Generated by: scripts/coccinelle/iterators/itnull.cocci

---

v2: Add sign off

 igb_cdev.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/igb/igb_cdev.c +1 -2
@@ -411,8 +411,7 @@ static int igb_close_file(struct inode *
 
 		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);
#1 lore raw

PATCH v2 1/1 igb: fix itnull.cocci warnings

Quoted 7 lines · Julia Lawall

The index variable of list_for_each_entry_safe should never be NULL.

Generated by: scripts/coccinelle/iterators/itnull.cocci

Quoted 6 lines

---

v2: Add sign off

?igb_cdev.c |??? 3 +--
?1 file changed, 1 insertion(+), 2 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20160107/95924108/attachment-0001.asc>