diff --git a/drivers/crypto/msm/ota_crypto.c b/drivers/crypto/msm/ota_crypto.c index 3dbd1127d865..cc454448618a 100644 --- a/drivers/crypto/msm/ota_crypto.c +++ b/drivers/crypto/msm/ota_crypto.c @@ -245,9 +245,11 @@ static void req_done(unsigned long data) pqce->active_command = new_req; spin_unlock_irqrestore(&podev->lock, flags); - new_req->err = 0; - /* start a new request */ - ret = start_req(pqce, new_req); + if (new_req) { + new_req->err = 0; + /* start a new request */ + ret = start_req(pqce, new_req); + } if (unlikely(new_req && ret)) { new_req->err = ret; complete(&new_req->complete); diff --git a/drivers/crypto/msm/qce50.c b/drivers/crypto/msm/qce50.c index e80523b61441..841773ff3cb1 100644 --- a/drivers/crypto/msm/qce50.c +++ b/drivers/crypto/msm/qce50.c @@ -5983,13 +5983,6 @@ static int qce_smmu_init(struct qce_device *pce_dev) goto ext_fail_set_attr; } - ret = iommu_domain_set_attr(mapping->domain, - DOMAIN_ATTR_UPSTREAM_IOVA_ALLOCATOR, &attr); - if (ret < 0) { - pr_err("Set UPSTREAM_IOVA_ALLOCATOR failed, err = %d\n", ret); - goto ext_fail_set_attr; - } - ret = arm_iommu_attach_device(pce_dev->pdev, mapping); if (ret < 0) { pr_err("Attach device failed, err = %d\n", ret);