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

Commit 42f8ca20 authored by Venkata Prahlad Valluru's avatar Venkata Prahlad Valluru Committed by Gerrit - the friendly Code Review server
Browse files

video: fbdev: msm: add null check for input arguments



Validate 'mfd' before dereferencing.

Change-Id: I6efcb8c085bb17b17bc6628fa095153cb03f8e06
Signed-off-by: default avatarVenkata Prahlad Valluru <vvalluru@codeaurora.org>
parent df713f3a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -5336,11 +5336,13 @@ void mdss_fb_calc_fps(struct msm_fb_data_type *mfd)

void mdss_fb_idle_pc(struct msm_fb_data_type *mfd)
{
	struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(mfd);
	struct mdss_overlay_private *mdp5_data;

	if (mdss_fb_is_power_off(mfd))
	if (!mfd || mdss_fb_is_power_off(mfd))
		return;

	mdp5_data = mfd_to_mdp5_data(mfd);

	if ((mfd->panel_info->type == MIPI_CMD_PANEL) && mdp5_data) {
		pr_debug("Notify fb%d idle power collapsed\n", mfd->index);
		sysfs_notify(&mfd->fbi->dev->kobj, NULL, "idle_power_collapse");