|
@@ -2911,15 +2911,13 @@ static int spcom_ioctl_handle_get_message(struct spcom_ioctl_message *arg, void
|
|
ch_name = arg->ch_name;
|
|
ch_name = arg->ch_name;
|
|
if (!is_valid_ch_name(ch_name)) {
|
|
if (!is_valid_ch_name(ch_name)) {
|
|
spcom_pr_err("invalid channel name\n");
|
|
spcom_pr_err("invalid channel name\n");
|
|
- ret = -EINVAL;
|
|
|
|
- goto get_message_out;
|
|
|
|
|
|
+ return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
/* DEVICE_NAME name is reserved for control channel */
|
|
/* DEVICE_NAME name is reserved for control channel */
|
|
if (is_control_channel_name(ch_name)) {
|
|
if (is_control_channel_name(ch_name)) {
|
|
spcom_pr_err("cannot send message on management channel %s\n", ch_name);
|
|
spcom_pr_err("cannot send message on management channel %s\n", ch_name);
|
|
- ret = -EFAULT;
|
|
|
|
- goto get_message_out;
|
|
|
|
|
|
+ return -EFAULT;
|
|
}
|
|
}
|
|
|
|
|
|
ch = spcom_find_channel_by_name(ch_name);
|
|
ch = spcom_find_channel_by_name(ch_name);
|
|
@@ -2995,7 +2993,7 @@ static int spcom_ioctl_handle_get_message(struct spcom_ioctl_message *arg, void
|
|
|
|
|
|
get_message_out:
|
|
get_message_out:
|
|
|
|
|
|
- if (ch && ch->active_pid == current_pid()) {
|
|
|
|
|
|
+ if (ch->active_pid == current_pid()) {
|
|
ch->active_pid = 0;
|
|
ch->active_pid = 0;
|
|
mutex_unlock(&ch->shared_sync_lock);
|
|
mutex_unlock(&ch->shared_sync_lock);
|
|
}
|
|
}
|