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

Commit e06b01af authored by Ashu Sharma's avatar Ashu Sharma
Browse files

drm/msm/sde: Add NULL check before Pointer Dereference



Add changes required to prevent the segmentation fault.

Change-Id: Id6717d3abe59561c4048555a02e67bb12848c66f
CRs-Fixed: 2443576
Signed-off-by: default avatarAshu Sharma <aashu@codeaurora.org>
parent 7b2ef2bf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -166,11 +166,12 @@ static inline int _sspp_subblk_offset(struct sde_hw_pipe *ctx,
		u32 *idx)
{
	int rc = 0;
	const struct sde_sspp_sub_blks *sblk = ctx->cap->sblk;
	const struct sde_sspp_sub_blks *sblk;

	if (!ctx)
		return -EINVAL;

	sblk = ctx->cap->sblk;
	switch (s_id) {
	case SDE_SSPP_SRC:
		*idx = sblk->src_blk.base;