From ddaf16c9fb95a1bb14f03f28d53ee8911e492192 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Tue, 14 Jan 2020 14:48:03 -0700 Subject: [PATCH] crypto: msm: Fix compile errors Fix an out of order definition of MODULE_DEVICE_TABLE, add missing brackets to fix a suspect indentation warning and mark an implcit switch fall through. Fixes: 377c69bf3e72 ("crypto: msm: Add QTI crypto drivers") Change-Id: Ic0dedbada33fd2e5c692e5f0d64fd0e7b7afb5f1 Signed-off-by: Jordan Crouse --- drivers/crypto/msm/qcedev.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/msm/qcedev.c b/drivers/crypto/msm/qcedev.c index 99ba34c6331e..4b0cd0d6023f 100644 --- a/drivers/crypto/msm/qcedev.c +++ b/drivers/crypto/msm/qcedev.c @@ -57,14 +57,14 @@ static dev_t qcedev_device_no; static struct class *driver_class; static struct device *class_dev; -MODULE_DEVICE_TABLE(of, qcedev_match); - static const struct of_device_id qcedev_match[] = { { .compatible = "qcom,qcedev"}, { .compatible = "qcom,qcedev,context-bank"}, {} }; +MODULE_DEVICE_TABLE(of, qcedev_match); + static int qcedev_control_clocks(struct qcedev_control *podev, bool enable) { unsigned int control_flag; @@ -1760,6 +1760,7 @@ static inline long qcedev_ioctl(struct file *file, err = -ENOTTY; goto exit_free_qcedev_areq; } + /* Fall-through */ case QCEDEV_IOCTL_SHA_UPDATE_REQ: { struct scatterlist sg_src; @@ -1810,10 +1811,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: @@ -1902,10 +1904,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: