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: