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

Commit 5eb6ddb3 authored by Arun KS's avatar Arun KS Committed by Naitik Bharadiya
Browse files

crypto: qcedev: Fix broken if statements



Irrespective of error, code execution always go to
exit_free_qcedev_areq. Fix it.

Change-Id: I237975a762febe6be2b2bc150520db1253daed16
Signed-off-by: default avatarArun KS <arunks@codeaurora.org>
parent 4c1695e4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1808,10 +1808,11 @@ static inline long qcedev_ioctl(struct file *file,
				handle->sha_ctxt.diglen);
		mutex_unlock(&hash_access_lock);
		if (copy_to_user((void __user *)arg, &qcedev_areq->sha_op_req,
					sizeof(struct qcedev_sha_op_req)))
					sizeof(struct qcedev_sha_op_req))) {
			err = -EFAULT;
			goto exit_free_qcedev_areq;
		}
		}
		break;

	case QCEDEV_IOCTL_SHA_FINAL_REQ:
@@ -1900,10 +1901,11 @@ static inline long qcedev_ioctl(struct file *file,
				handle->sha_ctxt.diglen);
		mutex_unlock(&hash_access_lock);
		if (copy_to_user((void __user *)arg, &qcedev_areq->sha_op_req,
					sizeof(struct qcedev_sha_op_req)))
					sizeof(struct qcedev_sha_op_req))) {
			err = -EFAULT;
			goto exit_free_qcedev_areq;
		}
		}
		break;

	case QCEDEV_IOCTL_MAP_BUF_REQ: