mutex_lock(&pohmelfs_config_lock);
- list_for_each_entry(g, &pohmelfs_config_list, group_entry) {
- if (g)
- total_msg += g->num_entry;
- }
+ list_for_each_entry(g, &pohmelfs_config_list, group_entry)
+ total_msg += g->num_entry;
if (total_msg == 0) {
if (pohmelfs_send_reply(err, 0, POHMELFS_NOINFO_ACK, msg, NULL))
err = -ENOMEM;
}
list_for_each_entry(g, &pohmelfs_config_list, group_entry) {
- if (g) {
- list_for_each_entry_safe(c, tmp, &g->config_list, config_entry) {
- struct pohmelfs_ctl *sc = &c->state.ctl;
- if (pohmelfs_send_reply(err, total_msg - i, POHMELFS_CTLINFO_ACK, msg, sc)) {
- err = -ENOMEM;
- goto out_unlock;
- }
- i += 1;
+ list_for_each_entry_safe(c, tmp, &g->config_list,
+ config_entry) {
+ struct pohmelfs_ctl *sc = &c->state.ctl;
+ if (pohmelfs_send_reply(err, total_msg - i,
+ POHMELFS_CTLINFO_ACK, msg,
+ sc)) {
+ err = -ENOMEM;
+ goto out_unlock;
}
+ i += 1;
}
}
}
} else {
list_for_each_entry(g, &pohmelfs_config_list, group_entry) {
- if (g) {
- list_for_each_entry_safe(c, tmp, &g->config_list, config_entry) {
- list_del(&c->config_entry);
- g->num_entry--;
- kfree(c);
- }
+ list_for_each_entry_safe(c, tmp, &g->config_list,
+ config_entry) {
+ list_del(&c->config_entry);
+ g->num_entry--;
+ kfree(c);
}
}
}
struct tm6000_core *dev = NULL;
mutex_lock(&tm6000_devlist_mutex);
- list_for_each_entry(dev, &tm6000_devlist, devlist) {
- if (dev)
- ops->fini(dev);
- }
+ list_for_each_entry(dev, &tm6000_devlist, devlist)
+ ops->fini(dev);
mutex_lock(&tm6000_extension_devlist_lock);
printk(KERN_INFO "tm6000: Remove (%s) extension\n", ops->name);