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

Commit f8c67df7 authored by Stephen Boyd's avatar Stephen Boyd Committed by Andy Gross
Browse files

soc: qcom: smem: Avoid NULL pointer exception on remove



Don't set a pointer to NULL and then dereference it in the next
line.

Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: default avatarAndy Gross <agross@codeaurora.org>
parent 1a7caca2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -730,8 +730,8 @@ static int qcom_smem_probe(struct platform_device *pdev)

static int qcom_smem_remove(struct platform_device *pdev)
{
	__smem = NULL;
	hwspin_lock_free(__smem->hwlock);
	__smem = NULL;

	return 0;
}