提交 f8c67df7 编写于 作者: S Stephen Boyd 提交者: Andy Gross

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: NStephen Boyd <sboyd@codeaurora.org>
Reviewed-by: NBjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: NAndy Gross <agross@codeaurora.org>
上级 1a7caca2
...@@ -730,8 +730,8 @@ static int qcom_smem_probe(struct platform_device *pdev) ...@@ -730,8 +730,8 @@ static int qcom_smem_probe(struct platform_device *pdev)
static int qcom_smem_remove(struct platform_device *pdev) static int qcom_smem_remove(struct platform_device *pdev)
{ {
__smem = NULL;
hwspin_lock_free(__smem->hwlock); hwspin_lock_free(__smem->hwlock);
__smem = NULL;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册