netdev-vport: Do not log empty warnings on success.
set_tunnel_config() always logs a warning, even on success. This
shouldn't happen.
Without this, some unit tests fail.
Fixes: 9fff138ec3a6("netdev: Add 'errp' to set_config().")
Acked-by: Antonio Fischetti
Acked-by: Ben Pfaff
@@ -561,11 +561,13 @@ set_tunnel_config(struct netdev *dev_, const struct smap *args, char **errp)
err = 0;
out:
+ if (errors.length) {
ds_chomp(&errors, '\n');
VLOG_WARN("%s", ds_cstr(&errors));
if (err) {
*errp = ds_steal_cstr(&errors);
}
+ }
ds_destroy(&errors);
