msm: mdss: Add null check for dma buffer memory
The dma buffer is checked only for error and not null. Changes are added to check if the buffer is null to prevent accessing invalid MUTEX lock or invalid dma buffer memory. CRs-Fixed: 1032180 Change-Id: Ia1ed1238b084d04eb787d078f7bb47a4e2a62a8a Signed-off-by: Shalini Krishnamoorthi <shakri@codeaurora.org>
This commit is contained in:
parent
4ba1744f2e
commit
665a666fc7
1 changed files with 1 additions and 1 deletions
|
@ -1027,7 +1027,7 @@ static int mdss_mdp_get_img(struct msmfb_data *img,
|
|||
} else if (iclient) {
|
||||
if (mdss_mdp_is_map_needed(mdata, data)) {
|
||||
data->srcp_dma_buf = dma_buf_get(img->memory_id);
|
||||
if (IS_ERR(data->srcp_dma_buf)) {
|
||||
if (IS_ERR_OR_NULL(data->srcp_dma_buf)) {
|
||||
pr_err("error on ion_import_fd\n");
|
||||
ret = PTR_ERR(data->srcp_dma_buf);
|
||||
data->srcp_dma_buf = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue