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

Commit 20eb5da2 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: free the memory in failure cases in notifier probe"

parents 92bc66d2 60e8e8b7
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -129,8 +129,10 @@ 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;
	if (!active_displays) {
		ret = -ENOMEM;
		goto end;
	}

	INIT_LIST_HEAD(&active_displays->list);

@@ -174,6 +176,9 @@ static int msm_notifier_probe(struct platform_device *pdev)
	list_for_each_entry(display, &active_displays->list, list)
		drm_panel_notifier_unregister(display->panel, &info->notifier);

	devm_kfree(&pdev->dev, active_displays);
end:
	devm_kfree(&pdev->dev, info);
	return ret;
}