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

Commit a27ec19d authored by Samantha Tran's avatar Samantha Tran
Browse files

disp: msm: add check for memory allocation



Check that memory was properly allocated in notifier
or return with error.

Change-Id: Id71feff3d441b373f3078cf6afcb6e569863ae97
Signed-off-by: default avatarSamantha Tran <samtran@codeaurora.org>
parent a624f4c1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -129,6 +129,9 @@ static int msm_notifier_probe(struct platform_device *pdev)

	active_displays = devm_kzalloc(&pdev->dev,
				sizeof(*active_displays), GFP_KERNEL);
	if (!active_displays)
		return -ENOMEM;

	INIT_LIST_HEAD(&active_displays->list);

	/* Set default max fps to 0 */