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

Commit d1de19bf authored by Krishna Konda's avatar Krishna Konda
Browse files

mtd: msm_qpic_nand: fix issue with runtime pm code



The runtime pm code expects the driver data to be set but
that is not set until after almost all of runtime pm initilization
code is complete. This would result in runtime pm code trying to
get the driver data and would cause a NULL pointer access since it
is not set up by then.

Change-Id: I18a9be6b3c97fb21e98818e67626473ca76dfdfd
Signed-off-by: default avatarKrishna Konda <kkonda@codeaurora.org>
parent b26a0ee6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2994,6 +2994,7 @@ static int msm_nand_probe(struct platform_device *pdev)
	err = msm_nand_setup_clocks_and_bus_bw(info, true);
	if (err)
		goto bus_unregister;
	dev_set_drvdata(&pdev->dev, info);
	err = pm_runtime_set_active(&pdev->dev);
	if (err)
		pr_err("pm_runtime_set_active() failed with error %d", err);
@@ -3031,7 +3032,6 @@ static int msm_nand_probe(struct platform_device *pdev)
		pr_err("Unable to register MTD partitions %d\n", err);
		goto free_bam;
	}
	dev_set_drvdata(&pdev->dev, info);

	pr_info("NANDc phys addr 0x%lx, BAM phys addr 0x%lx, BAM IRQ %d\n",
			info->nand_phys, info->bam_phys, info->bam_irq);