Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03e13904 authored by Yida Wang's avatar Yida Wang
Browse files

seemp: fix minor issues



- Fix ioctl handling control flow so that a request is only invalid
  if the command is unknown.
- Append a newline character to the end of an error log message.

Change-Id: Iab49c94ac5103bffc840d94da42cb0ce36a93728
Signed-off-by: default avatarYida Wang <yidaw@codeaurora.org>
parent 1d9aee75
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -346,10 +346,12 @@ static long seemp_logk_ioctl(struct file *filp, unsigned int cmd,
		return seemp_logk_set_mapping(arg);
	} else if (cmd == SEEMP_CMD_CHECK_FILTER) {
		return seemp_logk_check_filter(arg);
	}
	} else {
		pr_err("Invalid Request %X\n", cmd);
		return -ENOIOCTLCMD;
	}
	return 0;
}

static long seemp_logk_reserve_rdblks(
		struct seemp_logk_dev *sdev, unsigned long arg)
@@ -756,7 +758,7 @@ __init int seemp_logk_init(void)
		desc.args[1] = PAGE_SIZE;
		ret = scm_call2(EL2_SCM_ID, &desc);
		if (ret || desc.ret[0] || desc.ret[1]) {
			pr_err("SCM call failed with ret val = %d %d %d",
			pr_err("SCM call failed with ret val = %d %d %d\n",
				ret, (int)desc.ret[0], (int)desc.ret[1]);
			free_page((unsigned long) el2_shared_mem);
			el2_shared_mem = NULL;