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

Commit 40b99c3f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mink: Avoid handling output params if TZ op returns an err"

parents b80accca d1c8aa7f
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -429,10 +429,17 @@ long smcinvoke_ioctl(struct file *filp, unsigned cmd, unsigned long arg)
		if (ret)
			goto out;

		/*
		 * if invoke op results in an err, no need to marshal_out and
		 * copy args buf to user space
		 */
		if (!req.result) {
			ret = marshal_out(in_msg, inmsg_size, &req, args_buf);

		ret |=  copy_to_user((void __user *)(uintptr_t)(req.args),
			ret |=  copy_to_user(
					(void __user *)(uintptr_t)(req.args),
					args_buf, nr_args * req.argsize);
		}
		ret |=  copy_to_user((void __user *)arg, &req, sizeof(req));
		if (ret)
			goto out;