ath10k: reformat help text in ath10k_read_simulate_fw_crash()
[firefly-linux-kernel-4.4.55.git] / net / openvswitch / vport.c
index 702fb21bfe15bd6f3b0deb1678ccaf21d27f1b71..6d8f2ec481d9d33927795cfd3f4a59bb7258f128 100644 (file)
@@ -137,8 +137,10 @@ struct vport *ovs_vport_alloc(int priv_size, const struct vport_ops *ops,
        vport->ops = ops;
        INIT_HLIST_NODE(&vport->dp_hash_node);
 
-       if (ovs_vport_set_upcall_portids(vport, parms->upcall_portids))
+       if (ovs_vport_set_upcall_portids(vport, parms->upcall_portids)) {
+               kfree(vport);
                return ERR_PTR(-EINVAL);
+       }
 
        vport->percpu_stats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
        if (!vport->percpu_stats) {