Commit 4d7659bf authored by Qinglang Miao's avatar Qinglang Miao Committed by Mike Snitzer

dm ioctl: fix error return code in target_message

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 2ca4c92f ("dm ioctl: prevent empty message")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent e8dc79d1
......@@ -1600,6 +1600,7 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
if (!argc) {
DMWARN("Empty message received.");
r = -EINVAL;
goto out_argv;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment