Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0441d97b authored by Anusha Koduru's avatar Anusha Koduru
Browse files

msm: mdss: Avoid NULL pointer access



Validate pointer to avoid NULL pointer access

Change-Id: I47671f0072a61c7025d47da74de13ab66a543064
Signed-off-by: default avatarAnusha Koduru <kanusha@codeaurora.org>
parent 163e94f6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -420,6 +420,10 @@ static struct mdss_mdp_wb_data *get_user_node(struct msm_fb_data_type *mfd,
		struct ion_client *iclient = mdss_get_ionclient();
		struct ion_handle *ihdl;

		if (IS_ERR_OR_NULL(iclient)) {
			pr_err("unable to get mdss ion client\n");
			return NULL;
		}
		ihdl = ion_import_dma_buf(iclient, data->memory_id);
		if (IS_ERR_OR_NULL(ihdl)) {
			pr_err("unable to import fd %d\n", data->memory_id);