diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-08-28 21:18:49 +0300 |
---|---|---|
committer | Andy Gross <agross@codeaurora.org> | 2015-10-14 22:51:20 +0300 |
commit | f8c67df71bcdd863d623985c9e8dc78368c862db (patch) | |
tree | ac9a3706ef45496cc4c2b9a4e4d30560392790cf /drivers/soc/qcom | |
parent | 1a7caca20ed56a80cea045327deaeb4e4379cbd1 (diff) | |
download | linux-f8c67df71bcdd863d623985c9e8dc78368c862db.tar.xz |
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/qcom')
-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) static int qcom_smem_remove(struct platform_device *pdev) { - __smem = NULL; hwspin_lock_free(__smem->hwlock); + __smem = NULL; return 0; } |