summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/core/seq/seq_clientmgr.c3
-rw-r--r--sound/core/seq/seq_ports.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 19d6fea012f6..81ef461a9118 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -1306,14 +1306,13 @@ static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg)
}
}
- info->addr = port->addr;
-
snd_seq_set_port_info(port, info);
err = snd_seq_insert_port(client, port_idx, port);
if (err < 0) {
kfree(port);
return err;
}
+ info->addr = port->addr;
if (info->capability & SNDRV_SEQ_PORT_CAP_UMP_ENDPOINT)
client->ump_endpoint_port = port->addr.port;
snd_seq_system_client_ev_port_start(port->addr.client, port->addr.port);
diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c
index 17daacd4476a..6612e92d801f 100644
--- a/sound/core/seq/seq_ports.c
+++ b/sound/core/seq/seq_ports.c
@@ -170,7 +170,8 @@ int snd_seq_insert_port(struct snd_seq_client *client, int port,
list_add_tail(&new_port->list, insert_before);
client->num_ports++;
new_port->addr.port = num; /* store the port number in the port */
- sprintf(new_port->name, "port-%d", num);
+ if (!new_port->name[0])
+ sprintf(new_port->name, "port-%d", num);
return num;
}