diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-08-28 14:18:49 -0400 |
---|---|---|
committer | Andy Gross <agross@codeaurora.org> | 2015-10-14 15:51:20 -0400 |
commit | f8c67df71bcdd863d623985c9e8dc78368c862db (patch) | |
tree | ac9a3706ef45496cc4c2b9a4e4d30560392790cf | |
parent | 1a7caca20ed56a80cea045327deaeb4e4379cbd1 (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>
-rw-r--r-- | drivers/soc/qcom/smem.c | 2 |
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) | |||
730 | 730 | ||
731 | static int qcom_smem_remove(struct platform_device *pdev) | 731 | static int qcom_smem_remove(struct platform_device *pdev) |
732 | { | 732 | { |
733 | __smem = NULL; | ||
734 | hwspin_lock_free(__smem->hwlock); | 733 | hwspin_lock_free(__smem->hwlock); |
734 | __smem = NULL; | ||
735 | 735 | ||
736 | return 0; | 736 | return 0; |
737 | } | 737 | } |