Loading drivers/misc/qseecom.c +21 −9 Original line number Diff line number Diff line Loading @@ -3565,12 +3565,14 @@ static int __qseecom_update_cmd_buf(void *msg, bool cleanup, } } /* Deallocate the kbuf */ if (!IS_ERR(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); sg_ptr = NULL; dmabuf = NULL; attach = NULL; } return ret; err: if (!IS_ERR(sg_ptr)) if (!IS_ERR_OR_NULL(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); return -ENOMEM; } Loading Loading @@ -3794,8 +3796,10 @@ static int __qseecom_update_cmd_buf_64(void *msg, bool cleanup, } } /* unmap the dmabuf */ if (!IS_ERR(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); sg_ptr = NULL; dmabuf = NULL; attach = NULL; } return ret; err: Loading @@ -3806,7 +3810,7 @@ static int __qseecom_update_cmd_buf_64(void *msg, bool cleanup, data->client.sec_buf_fd[i].size, data->client.sec_buf_fd[i].vbase, data->client.sec_buf_fd[i].pbase); if (!IS_ERR(sg_ptr)) if (!IS_ERR_OR_NULL(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); return -ENOMEM; } Loading Loading @@ -6560,12 +6564,14 @@ static int __qseecom_update_qteec_req_buf(struct qseecom_qteec_modfd_req *req, data->sglist_cnt = i + 1; } /* unmap the dmabuf */ if (!IS_ERR(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); sg_ptr = NULL; dmabuf = NULL; attach = NULL; } return ret; err: if (!IS_ERR(sg_ptr)) if (!IS_ERR_OR_NULL(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); return -ENOMEM; } Loading Loading @@ -8558,6 +8564,12 @@ static int qseecom_probe(struct platform_device *pdev) qseecom.pdev = class_dev; qseecom.dev = &pdev->dev; rc = dma_set_mask(qseecom.dev, DMA_BIT_MASK(64)); if (rc) { pr_err("qseecom failed to set dma mask\n", rc); goto exit_del_cdev; } /* register client for bus scaling */ if (pdev->dev.of_node) { qseecom.pdev->of_node = pdev->dev.of_node; Loading Loading
drivers/misc/qseecom.c +21 −9 Original line number Diff line number Diff line Loading @@ -3565,12 +3565,14 @@ static int __qseecom_update_cmd_buf(void *msg, bool cleanup, } } /* Deallocate the kbuf */ if (!IS_ERR(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); sg_ptr = NULL; dmabuf = NULL; attach = NULL; } return ret; err: if (!IS_ERR(sg_ptr)) if (!IS_ERR_OR_NULL(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); return -ENOMEM; } Loading Loading @@ -3794,8 +3796,10 @@ static int __qseecom_update_cmd_buf_64(void *msg, bool cleanup, } } /* unmap the dmabuf */ if (!IS_ERR(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); sg_ptr = NULL; dmabuf = NULL; attach = NULL; } return ret; err: Loading @@ -3806,7 +3810,7 @@ static int __qseecom_update_cmd_buf_64(void *msg, bool cleanup, data->client.sec_buf_fd[i].size, data->client.sec_buf_fd[i].vbase, data->client.sec_buf_fd[i].pbase); if (!IS_ERR(sg_ptr)) if (!IS_ERR_OR_NULL(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); return -ENOMEM; } Loading Loading @@ -6560,12 +6564,14 @@ static int __qseecom_update_qteec_req_buf(struct qseecom_qteec_modfd_req *req, data->sglist_cnt = i + 1; } /* unmap the dmabuf */ if (!IS_ERR(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); sg_ptr = NULL; dmabuf = NULL; attach = NULL; } return ret; err: if (!IS_ERR(sg_ptr)) if (!IS_ERR_OR_NULL(sg_ptr)) qseecom_dmabuf_unmap(sg_ptr, attach, dmabuf); return -ENOMEM; } Loading Loading @@ -8558,6 +8564,12 @@ static int qseecom_probe(struct platform_device *pdev) qseecom.pdev = class_dev; qseecom.dev = &pdev->dev; rc = dma_set_mask(qseecom.dev, DMA_BIT_MASK(64)); if (rc) { pr_err("qseecom failed to set dma mask\n", rc); goto exit_del_cdev; } /* register client for bus scaling */ if (pdev->dev.of_node) { qseecom.pdev->of_node = pdev->dev.of_node; Loading