summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-08-28 11:18:49 -0700
committerAndy Gross <agross@codeaurora.org>2015-10-14 14:51:20 -0500
commitf8c67df71bcdd863d623985c9e8dc78368c862db (patch)
treeac9a3706ef45496cc4c2b9a4e4d30560392790cf /drivers/soc
parent1a7caca20ed56a80cea045327deaeb4e4379cbd1 (diff)
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: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Andy Gross <agross@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/smem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
index 52365188a1c2..f402a606eb7d 100644
--- a/drivers/soc/qcom/smem.c
+++ b/drivers/soc/qcom/smem.c
@@ -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;
}