Merge "msm: mdss: Increase fbmem buf ref count before use in mdp3"

This commit is contained in:
Linux Build Service Account 2018-05-17 12:23:36 -07:00 committed by Gerrit - the friendly Code Review server
commit 3a9f9cc591

View file

@ -1564,13 +1564,16 @@ static int mdp3_get_metadata(struct msm_fb_data_type *mfd,
break;
case metadata_op_get_ion_fd:
if (mfd->fb_ion_handle && mfd->fb_ion_client) {
get_dma_buf(mfd->fbmem_buf);
metadata->data.fbmem_ionfd =
ion_share_dma_buf_fd(mfd->fb_ion_client,
mfd->fb_ion_handle);
if (metadata->data.fbmem_ionfd < 0)
if (metadata->data.fbmem_ionfd < 0) {
dma_buf_put(mfd->fbmem_buf);
pr_err("fd allocation failed. fd = %d\n",
metadata->data.fbmem_ionfd);
}
}
break;
default:
pr_warn("Unsupported request to MDP GET META IOCTL.\n");