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

Commit c283e488 authored by Yaniv Gardi's avatar Yaniv Gardi
Browse files

scsi: ufs: fix a bug related to a null pointer access



In this change there is a fix of a possible NULL pointer access.

Change-Id: Ibc5031f7ccb8b0efda65453b3899a23abfce94c5
Signed-off-by: default avatarYaniv Gardi <ygardi@codeaurora.org>
parent 681cdee2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -6028,7 +6028,10 @@ int ufshcd_system_resume(struct ufs_hba *hba)
	int ret = 0;
	ktime_t start = ktime_get();

	if (!hba || !hba->is_powered || pm_runtime_suspended(hba->dev))
	if (!hba)
		return -EINVAL;

	if (!hba->is_powered || pm_runtime_suspended(hba->dev))
		/*
		 * Let the runtime resume take care of resuming
		 * if runtime suspended.