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

Commit 5708c107 authored by Pradeep P V K's avatar Pradeep P V K
Browse files

mtd: msm_qpic_nand: Add runtime status check in notifiers



During panic, all cores and irq's will gets disable. So, it
is not recommended to request for a new resource during this time.

So, add a check to return from notifier call based on the device
runtime status.

Change-Id: Ie4fd526ad2d107008b4af13997534fb614ca507a
Signed-off-by: default avatarPradeep P V K <quic_pragalla@quicinc.com>
parent 35fe9a34
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4371,6 +4371,15 @@ static int msm_nand_bam_panic_notifier(struct notifier_block *this,
	struct msm_nand_chip *chip = &info->nand_chip;
	int err;

	/* We shouldn't request for a new resource during panic
	 * as the cores and irq's were already in disabled state.
	 * So, check device runtime status before request for a
	 * resource (clock and bus).
	 */

	if (pm_runtime_suspended(chip->dev))
		return NOTIFY_DONE;

	err = msm_nand_get_device(chip->dev);
	if (err)
		goto out;