aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-02-28 23:44:27 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-28 23:44:27 -0500
commita337499f660ff70a12cea6607b9a64d7420e32dc (patch)
tree94b0a5b6cb4a5f7ef08d2b32d74f29adae5e978a
parent2335f8ec27e125208d8d2d3e257a82862c4977d6 (diff)
[IPV4]: Remove ifa != NULL check.
This is a callback registered to inet address notifier chain. The check is useless as: - ifa is always != NULL - similar checks are abscent in all other notifiers. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/via-velocity.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index cc0addb5640c..c50fdeed9e85 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -3460,21 +3460,19 @@ static int velocity_resume(struct pci_dev *pdev)
3460static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) 3460static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr)
3461{ 3461{
3462 struct in_ifaddr *ifa = (struct in_ifaddr *) ptr; 3462 struct in_ifaddr *ifa = (struct in_ifaddr *) ptr;
3463 struct net_device *dev = ifa->ifa_dev->dev;
3464 struct velocity_info *vptr;
3465 unsigned long flags;
3463 3466
3464 if (ifa) { 3467 spin_lock_irqsave(&velocity_dev_list_lock, flags);
3465 struct net_device *dev = ifa->ifa_dev->dev; 3468 list_for_each_entry(vptr, &velocity_dev_list, list) {
3466 struct velocity_info *vptr; 3469 if (vptr->dev == dev) {
3467 unsigned long flags; 3470 velocity_get_ip(vptr);
3468 3471 break;
3469 spin_lock_irqsave(&velocity_dev_list_lock, flags);
3470 list_for_each_entry(vptr, &velocity_dev_list, list) {
3471 if (vptr->dev == dev) {
3472 velocity_get_ip(vptr);
3473 break;
3474 }
3475 } 3472 }
3476 spin_unlock_irqrestore(&velocity_dev_list_lock, flags);
3477 } 3473 }
3474 spin_unlock_irqrestore(&velocity_dev_list_lock, flags);
3475
3478 return NOTIFY_DONE; 3476 return NOTIFY_DONE;
3479} 3477}
3480 3478