list_for_each_entry(s, &ax25_dev_list, list) {
if (s == ax25_dev) {
list_del(&s->list);
- goto unlock_put;
+ break;
}
}
- dev->ax25_ptr = NULL;
- spin_unlock_bh(&ax25_dev_lock);
- ax25_dev_put(ax25_dev);
- return;
-unlock_put:
dev->ax25_ptr = NULL;
spin_unlock_bh(&ax25_dev_lock);
netdev_put(dev, &ax25_dev->dev_tracker);