diff options
-rw-r--r-- | net/openvswitch/vport.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index 6cd760131f15..7f0ef3794c51 100644 --- a/net/openvswitch/vport.c +++ b/net/openvswitch/vport.c | |||
@@ -127,8 +127,10 @@ struct vport *ovs_vport_alloc(int priv_size, const struct vport_ops *ops, | |||
127 | vport->ops = ops; | 127 | vport->ops = ops; |
128 | 128 | ||
129 | vport->percpu_stats = alloc_percpu(struct vport_percpu_stats); | 129 | vport->percpu_stats = alloc_percpu(struct vport_percpu_stats); |
130 | if (!vport->percpu_stats) | 130 | if (!vport->percpu_stats) { |
131 | kfree(vport); | ||
131 | return ERR_PTR(-ENOMEM); | 132 | return ERR_PTR(-ENOMEM); |
133 | } | ||
132 | 134 | ||
133 | spin_lock_init(&vport->stats_lock); | 135 | spin_lock_init(&vport->stats_lock); |
134 | 136 | ||