dpif-netdev: Don't check if xcalloc() failed when creating meter.
xcalloc() can't return null.
Acked-by: Flavio Leitner
Acked-by: Ben Pfaff
@@ -5199,7 +5199,7 @@ dpif_netdev_meter_set(struct dpif *dpif, ofproto_meter_id meter_id,
/* Allocate meter */
meter = xzalloc(sizeof *meter
+ config->n_bands * sizeof(struct dp_meter_band));
- if (meter) {
+
meter->flags = config->flags;
meter->n_bands = config->n_bands;
meter->max_delta_t = 0;
@@ -5236,8 +5236,6 @@ dpif_netdev_meter_set(struct dpif *dpif, ofproto_meter_id meter_id,
return 0;
}
- return ENOMEM;
-}
static int
dpif_netdev_meter_get(const struct dpif *dpif,
